From 8d0034663c7e6d9ad079cc1910dedb36eb802281 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 28 Dec 2023 04:05:06 +0200 Subject: Add gnosis-unique-tags --- gnosis.el | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.3