summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnosis.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index b22144c..202bff9 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -391,6 +391,8 @@ Compare 2 strings, ignoring case and whitespace."
(defun gnosis-select-by-tag (input-tags)
"Return note id for every note with INPUT-TAGS."
+ (unless (listp input-tags)
+ (error "`input-tags' need to be a list"))
(cl-loop for (id tags) in (emacsql gnosis-db [:select [id tags] :from notes])
when (cl-every (lambda (tag) (member tag tags)) input-tags)
collect id))