[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote c5c0132f4c 1/5: Add denote-link--insert-links he
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote c5c0132f4c 1/5: Add denote-link--insert-links helper function |
Date: |
Fri, 1 Dec 2023 09:57:44 -0500 (EST) |
branch: externals/denote
commit c5c0132f4caad33d309a0d914dc8400a9ac322ef
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add denote-link--insert-links helper function
---
denote.el | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/denote.el b/denote.el
index d1a2500ad6..b701aba35f 100644
--- a/denote.el
+++ b/denote.el
@@ -3543,6 +3543,18 @@ When ID-ONLY is non-nil, use a generic link format. See
'denote-add-links
"2.0.0")
+(defun denote-link--insert-links (files current-file-type &optional id-only)
+ "Insert at point a typographic list of links matching FILES.
+
+With CURRENT-FILE-TYPE as a symbol among those specified in
+`denote-file-type' (or the `car' of each element in
+`denote-file-types'), format the link accordingly. With a nil or
+unknown non-nil value, default to the Org notation.
+
+With ID-ONLY as a non-nil value, produce links that consist only
+of the identifier, thus deviating from CURRENT-FILE-TYPE."
+ (insert (denote-link--prepare-links files current-file-type id-only)))
+
;;;###autoload
(defun denote-add-links (regexp &optional id-only)
"Insert links to all notes matching REGEXP.
@@ -3560,7 +3572,7 @@ inserts links with just the identifier."
(if-let ((files (denote-directory-files regexp :omit-current))
(beg (point)))
(progn
- (insert (denote-link--prepare-links files file-type id-only))
+ (denote-link--insert-links files file-type id-only)
(denote-link-buttonize-buffer beg (point)))
(message "No links matching `%s'" regexp))))
- [elpa] externals/denote updated (6c6ffb3d8a -> 341bd586a6), ELPA Syncer, 2023/12/01
- [elpa] externals/denote 414b6d51d0 2/5: Add denote-sort-get-files, ELPA Syncer, 2023/12/01
- [elpa] externals/denote 62bb9e3188 4/5: Add work-in-progress sort capability of 'denote-links' Org dynamic block, ELPA Syncer, 2023/12/01
- [elpa] externals/denote c5c0132f4c 1/5: Add denote-link--insert-links helper function,
ELPA Syncer <=
- [elpa] externals/denote 341bd586a6 5/5: Add no-sort parameter to denote-link--prepare-links, denote-link--insert-links, ELPA Syncer, 2023/12/01
- [elpa] externals/denote 2f5b4ee97d 3/5: Abstract let bound code into its own function in denote-org-dblock.el, ELPA Syncer, 2023/12/01