Simplify denote-find-link

This commit is contained in:
Protesilaos Stavrou 2025-04-28 17:23:36 +03:00
parent cdb44a2d31
commit 81e529d8f3
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -4927,12 +4927,10 @@ Also see `denote-link-return-backlinks'."
Also see `denote-find-backlink'."
(declare (interactive-only t))
(interactive)
(find-file
(concat
(denote-directory)
(denote-select-linked-file-prompt
(or (denote-link-return-links)
(user-error "No links found"))))))
(when-let* ((links (or (denote-link-return-links)
(user-error "No links found")))
(selected (denote-select-linked-file-prompt links)))
(find-file selected)))
;;;###autoload
(defun denote-link-after-creating (&optional id-only)