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

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

[elpa] externals/denote f535e918c4 2/3: Limit xrefs to notes files only


From: ELPA Syncer
Subject: [elpa] externals/denote f535e918c4 2/3: Limit xrefs to notes files only
Date: Mon, 10 Oct 2022 10:57:30 -0400 (EDT)

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

    Limit xrefs to notes files only
    
    We do not want to grep the contents of, say, video files as this (i)
    will not return the expected result, while (ii) will considerably slow
    down the collection of backlinks.
---
 denote.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/denote.el b/denote.el
index e0747ce405..1cbba9ef6b 100644
--- a/denote.el
+++ b/denote.el
@@ -1123,7 +1123,7 @@ Run `denote-desluggify' on title if the extraction is 
sucessful."
   "Return xrefs of IDENTIFIER in variable `denote-directory'.
 The xrefs are returned as an alist."
   (xref--alistify
-   (xref-matches-in-files identifier (denote-directory-files))
+   (xref-matches-in-files identifier (denote-directory-text-only-files))
    (lambda (x)
      (xref-location-group (xref-item-location x)))))
 
@@ -1136,10 +1136,9 @@ Parse `denote--retrieve-xrefs'."
 
 (defun denote--retrieve-process-grep (identifier)
   "Process lines matching IDENTIFIER and return list of files."
-  (seq-filter
-   #'denote-file-is-note-p
-   (delete (buffer-file-name) (denote--retrieve-files-in-xrefs
-                               (denote--retrieve-xrefs identifier)))))
+  (delete (buffer-file-name)
+          (denote--retrieve-files-in-xrefs
+           (denote--retrieve-xrefs identifier))))
 
 ;;;; New note
 



reply via email to

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