From 8f5316bd10b9f7702485fe3da23d0faeb52a9112 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 28 Dec 2023 13:28:18 +0200 Subject: Add gnosis-supsended-p --- gnosis.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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'. -- cgit v1.2.3