Function: denote-get-backlinks

denote-get-backlinks is a byte-compiled function defined in denote.el.

Signature

(denote-get-backlinks &optional FILE)

Documentation

Return list of backlinks in current or optional FILE.

Also see denote-get-links.

Aliases

denote-link-return-backlinks (obsolete since 4.1.0)

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote-get-backlinks (&optional file)
  "Return list of backlinks in current or optional FILE.
Also see `denote-get-links'."
  (when-let* ((current-file (or file (buffer-file-name)))
              (id (or (denote-retrieve-filename-identifier current-file)
                      (user-error "The file does not have a Denote identifier")))
              (_ (denote-file-is-in-denote-directory-p current-file))
              (xrefs (denote-retrieve-xref-alist-for-backlinks id)))
    (mapcar #'car xrefs)))