emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote b64cc491bc 199/355: Add history to denote-link-a


From: ELPA Syncer
Subject: [elpa] externals/denote b64cc491bc 199/355: Add history to denote-link-add-links command
Date: Sun, 26 Jun 2022 23:58:23 -0400 (EDT)

branch: externals/denote
commit b64cc491bcbbd57e5610437f0c5b228631ff0906
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Add history to denote-link-add-links command
---
 denote-link.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/denote-link.el b/denote-link.el
index 155380abba..ecde257590 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -257,6 +257,9 @@ default, it will show up below the current window."
                 (max (point-max)))
             (buffer-substring-no-properties min max)))))
 
+(defvar denote-link--add-links-history nil
+  "Minibuffer history for `denote-link-add-links'.")
+
 ;;;###autoload
 (defun denote-link-add-links (regexp)
   "Insert links to all notes matching REGEXP.
@@ -264,14 +267,13 @@ Use this command to reference multiple files at once.
 Particularly useful for the creation of metanotes (read the
 manual for more on the matter)."
   (interactive
-   (list (read-regexp "Insert links matching REGEX: ")))
+   (list (read-regexp "Insert links matching REGEX: " nil 
'denote-link--add-links-history)))
   (let* ((default-directory (denote-directory))
          (ext (denote-link--file-type-format (buffer-file-name))))
     (if-let ((files (denote--directory-files-matching-regexp regexp)))
         (insert (denote-link--prepare-links files ext))
       (user-error "No links matching `%s'" regexp))))
 
-
 ;;;; Register `denote:' custom Org hyperlink
 
 (declare-function org-link-set-parameters "ol.el" (type &rest parameters))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]