summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-28 13:28:18 +0200
committerThanos Apollo <[email protected]>2023-12-28 13:28:18 +0200
commit8f5316bd10b9f7702485fe3da23d0faeb52a9112 (patch)
tree88d6668418f1e023ddc2ec284ebf5a3edc9b3130 /gnosis.el
parent721981e398d48f31c7d067f8add9bee24748e511 (diff)
Add gnosis-supsended-p
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnosis.el b/gnosis.el
index 54ab00d..27bd961 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -413,7 +413,7 @@ Compare 2 strings, ignoring case and whitespace."
(defun gnosis-unique-tags ()
"Return a list of unique strings for tags in gnosis-db."
- (cl-loop for tags in (emacsql gnosis-db [:select tags :from notes])
+ (cl-loop for tags in (gnosis-select 'tags 'notes)
nconc tags into all-tags
finally return (delete-dups all-tags)))
@@ -425,6 +425,12 @@ Compare 2 strings, ignoring case and whitespace."
when (cl-every (lambda (tag) (member tag tags)) input-tags)
collect id))
+(defun gnosis-suspended-p (id)
+ "Return t if note with ID is suspended."
+ (if (= (gnosis-get 'suspend 'review-log `(= id ,id)) 1)
+ t
+ nil))
+
(defun gnosis-prompt-tag ()
"Prompt user to enter tags, until they enter `q'.