summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-05-10 14:01:52 +0300
committerThanos Apollo <[email protected]>2024-05-10 14:01:52 +0300
commit39a54a94c460147494b2dd079a39d2c1ce91168a (patch)
treea24c611a1485e6a0bfe0ede7043940beb2968bf7 /gnosis.el
parented098f3db517b83e0655cab74c89b49f7b47e8ad (diff)
Add gnosis-get-deck--note
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 50c35f2..3bfc4b6 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -486,6 +486,13 @@ Set SPLIT to t to split all input given."
"Return id for DECK name."
(gnosis-get 'id 'decks `(= name ,deck)))
+(defun gnosis-get-deck--note (id &optional name)
+ "Get deck id for note ID.
+
+If NAME is t, return name of deck."
+ (let* ((id-clause `(= id ,id))
+ (deck (gnosis-get 'deck-id 'notes id-clause)))
+ (if name (gnosis--get-deck-name deck) deck)))
(cl-defun gnosis-suspend-note (id)
"Suspend note with ID."