branch: externals/denote commit 12062e238c441047377dc47c3c275886ecb698d8 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
DEPRECATE denote-link-with-signature The denote-link command already inserts a signature if it is there, plus we have the denote-link-description-format, which can be set to whatever style the user prefers. This command I am deprecating was basically doing what a user gets as soon as they type = in the minibuffer (which will match files that have a signature). --- README.org | 18 ------------------ denote.el | 28 ++-------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/README.org b/README.org index 398843e5a2..53507681ee 100644 --- a/README.org +++ b/README.org @@ -2917,24 +2917,6 @@ above is for interactive usage. Links are created only for files which qualify as a "note" for our purposes ([[#h:fc913d54-26c8-4c41-be86-999839e8ad31][Linking notes]]). -** Insert link to file with signature -:PROPERTIES: -:CUSTOM_ID: h:066e5221-9844-474b-8858-398398646f86 -:END: - -#+findex: denote-link-with-signature -The command ~denote-link-with-signature~ prompts for a file among -those that contain a ===SIGNATURE= and inserts a link to it. The -description of the link includes the text of the signature and that of -the file's title, if any. For example, a link to the following file: - -: 20230925T144303==abc--my-first-signature-note__denote_testing.txt - -will get this link: =[[denote:20230925T144303][abc My first signature note]]=. - -For more advanced uses, refer to the doc string of the ~denote-link~ -function ([[#h:5e5e3370-12ab-454f-ba09-88ff44214324][Adding a single link]]). - ** Insert links from marked files in Dired :PROPERTIES: :CUSTOM_ID: h:9cbb692e-5d8a-44a6-9193-899a07872a07 diff --git a/denote.el b/denote.el index 4e077d2e2f..00adfe33ee 100644 --- a/denote.el +++ b/denote.el @@ -900,9 +900,6 @@ documentation of the `org-open-at-point' command." 'denote-link-description-format "3.2.0") -;; FIXME 2024-11-03: This breaks `denote-link-with-signature'. Check -;; the FIXME above that function to decide how best to proceed. - (defcustom denote-link-description-format #'denote-link-description-with-signature-and-title "The format of a link description text. This determines how `denote-link' and related functions create a link @@ -4526,9 +4523,7 @@ If the DESCRIPTION is empty, format the link the same as with ID-ONLY. When called from Lisp, FILE is a string representing a full file system path. FILE-TYPE is a symbol as described in the user option `denote-file-type'. DESCRIPTION is a string. Whether the caller treats -the active region specially, is up to it. - -Also see `denote-link-with-signature'." +the active region specially, is up to it." (interactive (let* ((file (denote-file-prompt nil "Link to FILE")) (file-type (denote-filetype-heuristics buffer-file-name)) @@ -4546,26 +4541,7 @@ Also see `denote-link-with-signature'." (defalias 'denote-insert-link 'denote-link "Alias for `denote-link' command.") -;;;###autoload -(defun denote-link-with-signature () - "Insert link to file with signature. -Prompt for file using minibuffer completion, limiting the list of -candidates to files with a signature in their file name. - -By default, the description of the link includes the signature, -if present, followed by the file's title, if any. - -For more advanced uses with Lisp, refer to the `denote-link' -function." - (declare (interactive-only t)) - (interactive) - (unless (or (denote--file-type-org-extra-p) - (and buffer-file-name (denote-file-has-supported-extension-p buffer-file-name))) - (user-error "The current file type is not recognized by Denote")) - (let* ((file (denote-file-prompt "=")) - (type (denote-filetype-heuristics (buffer-file-name))) - (description (denote-get-link-description file))) - (denote-link file type description))) +(make-obsolete 'denote-link-with-signature nil " 3.2.0: Use the `denote-link-description-format'.") (defun denote-link--collect-identifiers (regexp) "Return collection of identifiers in buffer matching REGEXP."