diff options
author | Thanos Apollo <[email protected]> | 2024-02-22 13:49:10 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-02-22 13:49:10 +0200 |
commit | f00f5846b954a49e1daa3abfb041427157c8ee92 (patch) | |
tree | b3ae32adbf4b384ee35913259ef9cea995249c7f /gnosis.el | |
parent | b12e5956b8c600d617ba3b817172c32149aa84ea (diff) |
Add gnosis-prompt-tags--split
Redo input of tags when creating choices. Make it simplier and easier.
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) |