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

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

[elpa] externals/denote 3074133f68 1/2: Fix how xrefs are analysed


From: ELPA Syncer
Subject: [elpa] externals/denote 3074133f68 1/2: Fix how xrefs are analysed
Date: Sun, 10 Jul 2022 15:57:31 -0400 (EDT)

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

    Fix how xrefs are analysed
    
    The previous implementation was returning a relative path if the notes'
    directory was declared a project, per project.el.  The relative path was
    not a valid value for our purposes.
    
    Thanks to Jean-Philippe Gagné Guay for the feedback and brainstorming in
    issue 42 over at the GitHub mirror:
    <https://github.com/protesilaos/denote/pull/42>.
---
 denote-retrieve.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/denote-retrieve.el b/denote-retrieve.el
index 51e6cb6472..9f9e40bf73 100644
--- a/denote-retrieve.el
+++ b/denote-retrieve.el
@@ -94,8 +94,10 @@ If optional KEY is non-nil, return the key instead."
 (defun denote-retrieve--xrefs (identifier)
   "Return xrefs of IDENTIFIER in variable `denote-directory'.
 The xrefs are returned as an alist."
-  (xref--analyze
-   (xref-matches-in-files identifier (denote--directory-files :absolute))))
+  (xref--alistify
+   (xref-matches-in-files identifier (denote--directory-files :absolute))
+   (lambda (x)
+     (xref-location-group (xref-item-location x)))))
 
 (defun denote-retrieve--files-in-xrefs (xrefs)
   "Return sorted file names sans directory from XREFS.



reply via email to

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