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

    Make denote-get-backlinks produce error earlier if needed
    
    If the file has no identifier, we do not want to check if it is in our
    directories, anyway.
---
 denote.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index 3b81edbabe..6730afd015 100644
--- a/denote.el
+++ b/denote.el
@@ -6056,9 +6056,9 @@ 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")))
+              (_ (denote-file-is-in-denote-directory-p current-file))
               (xrefs (denote-retrieve-xref-alist-for-backlinks id)))
     (mapcar #'car xrefs)))
 

Reply via email to