From f00f5846b954a49e1daa3abfb041427157c8ee92 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 22 Feb 2024 13:49:10 +0200 Subject: Add gnosis-prompt-tags--split Redo input of tags when creating choices. Make it simplier and easier. --- gnosis.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnosis.el b/gnosis.el index e8ea3cc..fdf048c 100644 --- a/gnosis.el +++ b/gnosis.el @@ -862,6 +862,16 @@ Returns a list of unique tags." (choices (mapcar (lambda (string) (replace-regexp-in-string "{\\|}" "" string)) input))) (list choices (+ correct-choice-index 1)))) +(defun gnosis-prompt-tags--split (&optional previous-note-tags) + "Prompt user for tags, split string by space. + +Return a list of tags, split by space. If PREVIOUS-NOTE-TAGS is +provided, use it as the default value." + (let* ((previous-note-tags (or nil previous-note-tags)) + (tags (split-string (read-from-minibuffer "Tags: " (mapconcat #'identity previous-note-tags " ")) " "))) + (setf gnosis-previous-note-tags tags) + tags)) + ;; Review ;;;;;;;;;; (defun gnosis-review-is-due-p (note-id) -- cgit v1.2.3