Function: denote-link--prepare-links

denote-link--prepare-links is a byte-compiled function defined in denote.el.

Signature

(denote-link--prepare-links FILES CURRENT-FILE-TYPE ID-ONLY &optional NO-SORT)

Documentation

Prepare links to FILES from CURRENT-FILE-TYPE.

When ID-ONLY is non-nil, use a generic link format.

With optional NO-SORT do not try to sort the inserted lines. Otherwise sort lines while accounting for denote-link-add-links-sort.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote-link--prepare-links (files current-file-type id-only &optional no-sort)
  "Prepare links to FILES from CURRENT-FILE-TYPE.
When ID-ONLY is non-nil, use a generic link format.

With optional NO-SORT do not try to sort the inserted lines.
Otherwise sort lines while accounting for `denote-link-add-links-sort'."
  (let ((links))
    (dolist (file files)
      (let* ((description (denote-get-link-description file current-file-type))
             (link (denote-format-link file description current-file-type id-only))
             (link-as-list-item (format denote-link--prepare-links-format link)))
        (push link-as-list-item links)))
    (if no-sort
        (nreverse links)
      (sort links #'string-collate-lessp))))