emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 7dc8f4bf7b 1/3: don't try to find forward links


From: ELPA Syncer
Subject: [elpa] externals/denote 7dc8f4bf7b 1/3: don't try to find forward links in non-text files
Date: Tue, 16 May 2023 12:57:46 -0400 (EDT)

branch: externals/denote
commit 7dc8f4bf7bc3bfde341d202228e83bcce82d6886
Author: relict007 <utils+sr.ht@kotlak.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    don't try to find forward links in non-text files
    
    If a file extension is not in 'denote-file-types', we have no way of
    parsing or finding outgoing links in it. This change checks for the
    file extension early on in 'when-let*' block and avoids opening the
    file which is a relatively costly operation (and would fail finding
    links anyway).
---
 denote.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/denote.el b/denote.el
index 7e653bb1a9..bdbb7ba502 100644
--- a/denote.el
+++ b/denote.el
@@ -2849,6 +2849,7 @@ whitespace-only), insert an ID-ONLY link."
   "Return list of links in current or optional FILE.
 Also see `denote-link-return-backlinks'."
   (when-let* ((current-file (or file (buffer-file-name)))
+              ((denote-file-has-supported-extension-p current-file))
               (file-type (denote-filetype-heuristics current-file))
               (regexp (denote--link-in-context-regexp file-type))
               (links (with-current-buffer (find-file-noselect current-file)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]