branch: externals/denote
commit 3074133f689e757a4c42920acac33da329104b5c
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    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