Function: denote-retrieve-xref-alist

denote-retrieve-xref-alist is a byte-compiled function defined in denote.el.

Signature

(denote-retrieve-xref-alist QUERY &optional FILES)

Documentation

Return xref alist of absolute file paths with location of matches for QUERY.

Optional FILES can be a list of files to search for. It can also be a regular expression, which means to use the text files in the variable denote-directory(var)/denote-directory(fun) that match that regexp.

If FILES is not given, use all text files as returned by denote-directory-files.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote-retrieve-xref-alist (query &optional files)
  "Return xref alist of absolute file paths with location of matches for QUERY.
Optional FILES can be a list of files to search for.  It can also be a
regular expression, which means to use the text files in the variable
`denote-directory' that match that regexp.

If FILES is not given, use all text files as returned by
`denote-directory-files'."
  (let* ((xref-file-name-display 'abs)
         (data
          (xref--analyze
           (xref-matches-in-files
            query
            (if (and files (listp files))
                files
              (denote-directory-files files denote-query--omit-current :text-only))))))
    (if-let* ((sort denote-query-sorting)
              (files-matched (mapcar #'car data))
              (files-sorted (denote-sort-files files-matched sort)))
        (mapcar (lambda (x) (assoc x data)) files-sorted)
      data)))