summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-28 04:05:06 +0200
committerThanos Apollo <[email protected]>2023-12-28 04:05:06 +0200
commit8d0034663c7e6d9ad079cc1910dedb36eb802281 (patch)
treebbe906af564cfe5a959130343e541e66191ddabe /gnosis.el
parent58b35802bf4c031b944f1c513467b08514f59c09 (diff)
Add gnosis-unique-tags
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 2313584..589ed27 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -358,6 +358,11 @@ Compare 2 strings, ignoring case and whitespace."
(modified-str2 (downcase (replace-regexp-in-string "\\s-" "" str2))))
(string= modified-str1 modified-str2)))
+(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])
+ nconc tags into all-tags
+ finally return (delete-dups all-tags)))
;; Review
;;;;;;;;;;
(defun gnosis-review--algorithm (id success)