summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-06 20:45:57 +0300
committerThanos Apollo <[email protected]>2024-08-06 20:45:57 +0300
commit8a857c2e7b0935d5f6213525bef027a4ea097ef8 (patch)
tree0c577c19326086f82819f74a0f916df54cae9806 /gnosis.el
parentcc2ec22d5a8d75568cffd0a8763f8fc19106e108 (diff)
New function: get-tag-notes.
* Return note-ids for TAG.
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 3a021fe..1496d1e 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1271,6 +1271,11 @@ If DUE, return only due notes."
(if due (gnosis-review-is-due-p id) t))
collect id))
+(defun gnosis-get-tag-notes (tag)
+ "Return note ids for TAG."
+ (let ((notes (gnosis-select 'id 'notes `(like tags ',(format "%%\"%s\"%%" tag)) t)))
+ notes))
+
(defun gnosis-suspended-p (id)
"Return t if note with ID is suspended."
(= (gnosis-get 'suspend 'review-log `(= id ,id)) 1))