summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-03 19:26:51 +0300
committerThanos Apollo <[email protected]>2024-08-03 19:26:51 +0300
commitba119ccb4d4cf07dc30e4a99bc9bef1ded8827af (patch)
tree47bdbb4670b5e72ea06a315e11f71f0e9e124972
parentf56faf26bada1cf89da94fa140adb99c2d02bac0 (diff)
New function: get-note-deck-name.
-rw-r--r--gnosis.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 22683fb..6c9e88d 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -706,6 +706,11 @@ Set SPLIT to t to split all input given."
"Return id for DECK name."
(gnosis-get 'id 'decks `(= name ,deck)))
+(defun gnosis-get-note-deck-name (id)
+ "Return deck name of note ID."
+ (let ((deck (gnosis-get 'deck-id 'notes `(= id ,id))))
+ (gnosis--get-deck-name deck)))
+
(defun gnosis-get-deck--note (id &optional name)
"Get deck id for note ID.