branch: externals/denote commit 447930e4105f6331e8d297d6ef962c3893fdd6a2 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make denote-get-backlinks only work in a denote directory Otherwise, we are trying to check if a file anywhere in the file system has backlinks in the 'denote-directory'. Those links should not happen, as 'denote:' links only work for identifiers in the 'denote-directory'. --- denote.el | 1 + 1 file changed, 1 insertion(+) diff --git a/denote.el b/denote.el index fd2b359ede..c1ff7aa2ae 100644 --- a/denote.el +++ b/denote.el @@ -6029,6 +6029,7 @@ Place the buffer below the current window or wherever the user option "Return list of backlinks in current or optional FILE. Also see `denote-get-links'." (when-let* ((current-file (or file (buffer-file-name))) + (_ (denote-file-is-in-denote-directory-p current-file)) (id (or (denote-retrieve-filename-identifier current-file) (user-error "The file does not have a Denote identifier")))) (mapcar #'car (denote-retrieve-xref-alist-for-backlinks id))))