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

    Make denote-link-open-at-mouse return an error if link is not resolved
---
 denote.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/denote.el b/denote.el
index eb8c4fdabc..fe099f1dd1 100644
--- a/denote.el
+++ b/denote.el
@@ -4222,11 +4222,13 @@ file's title.  This has the same meaning as in 
`denote-link'."
   "Keymap for mouse actions over fontified Denote links.")
 
 (defun denote-link-open-at-mouse (ev)
-  "Open denote link after mouse click."
+  "Open Denote link for mouse EV click."
   (interactive "e")
   (mouse-set-point ev)
-  (when-let ((id (get-text-property (point) 'denote-link-id)))
-    (funcall denote-link-button-action (denote-get-path-by-id id))))
+  (if-let ((id (get-text-property (point) 'denote-link-id))
+           (path (denote-get-path-by-id id)))
+      (funcall denote-link-button-action path)
+    (error "Cannot resolve the link at point")))
 
 (defun denote-fontify-links (&optional limit)
   "Fontify denote links.

Reply via email to