branch: externals/denote
commit 917645b0ec6513b09bb95c665e61f16ace6a8b23
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make denote--get-link-file-path-at-point accept optional POINT
---
 denote.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index 1d9781cf46..495690dfa3 100644
--- a/denote.el
+++ b/denote.el
@@ -4220,8 +4220,11 @@ Implementation based on the function 
`org-activate-links'."
 
 (defun denote--get-link-file-path-at-point ()
   "Return link to the Denote file path at point.
+(defun denote--get-link-file-path-at-point (&optional point)
+  "Return link to the Denote file path at point or optional POINT.
 To be used as a `thing-at' provider."
-  (when-let (id (get-text-property (point) 'denote-link-id))
+  (when-let ((position (or point (point)))
+             (id (get-text-property position 'denote-link-id)))
     (concat "file:" (denote-get-path-by-id id))))
 
 (defvar thing-at-point-provider-alist)

Reply via email to