0fe7122f70690ee235e308bd52373541d191bd21 — Protesilaos Stavrou 2 months ago c4b3187
Store denote-link-with-signature format in a private variable
1 files changed, 8 insertions(+), 5 deletions(-)

M denote.el
M denote.el => denote.el +8 -5
@@ 3140,6 3140,13 @@ treats the active region specially, is up to it."
(defalias 'denote-insert-link 'denote-link
  "Alias for `denote-link' command.")

;; NOTE 2023-12-05 04:16 +0200: This is a candidate for a user option,
;; subject to feedback.  I think the signature should be better
;; disambiguated in this context, although the double space is a good
;; start.
(defvar denote--link-signature-format "%s  %s"
  "Format of link description for `denote-link-with-signature'.")

(defun denote--link-get-description-with-signature (file file-type)
  "Return `denote-link-with-signature' description.
Retrieve the title and signature from FILE with FILE-TYPE.  If

@@ 3152,11 3159,7 @@ Also see `denote--link-get-description'."
         (text (denote--link-get-description file file-type))
         (specifiers (if (and text
                              (not (string-empty-p text)))
                         ;; NOTE 2023-12-02: I want to elicit more
                         ;; feedback before I make this a variable.
                         ;; How do users of signatures prefer to
                         ;; display them in link descriptions?
                         "%s %s"
    (format specifiers signature text)))