From 6a21a8723274e11d4034ab86bb13cb00808d2996 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 4 Jan 2024 16:33:19 +0200 Subject: Update gnosis-get-tags--unique Flatten returned list --- gnosis.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnosis.el b/gnosis.el index e654db6..a2afc22 100644 --- a/gnosis.el +++ b/gnosis.el @@ -681,12 +681,12 @@ Optionally, add cusotm PROMPT." (defun gnosis-get-tags--unique () "Return a list of unique strings for tags in gnosis-db." - (cl-loop for tags in (gnosis-select 'tags 'notes) + (cl-loop for tags in (apply #'append (gnosis-select 'tags 'notes)) nconc tags into all-tags finally return (delete-dups all-tags))) (defun gnosis-select-by-tag (input-tags) - "Return note id for every note with INPUT-TAGS." + "Return note ID's 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]) -- cgit v1.2.3