summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-25 02:36:54 +0200
committerThanos Apollo <[email protected]>2023-12-25 02:36:54 +0200
commit4a77e5e770b35dc5b63d00e1a97eeecb660fa7e0 (patch)
treecb7f46cef889ba8fe4a50ccba5f7efdaca406674 /gnosis.el
parent378293357527ff94cf038e76d30f283c18296a79 (diff)
Message deck name upon addition/deletion
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/gnosis.el b/gnosis.el
index abfbf69..3af5089 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -99,7 +99,8 @@ the returns the list of inputs in reverse order."
(defun gnosis-add-deck (name)
"Create deck with NAME."
(interactive (list (read-string "Deck Name: ")))
- (gnosis--insert-into 'decks `([nil ,name])))
+ (gnosis--insert-into 'decks `([nil ,name]))
+ (message "Created deck '%s'" name))
(defun gnosis--get-deck-name ()
"Get name from table DECKS."
@@ -112,10 +113,11 @@ the returns the list of inputs in reverse order."
(let ((deck (gnosis--get-deck-name)))
(gnosis-get 'id 'decks `(= name ,deck))))
-(defun gnosis-delete-deck (id)
- "Delete deck with id value of ID."
- (interactive (list (gnosis--get-deck-id)))
- (gnosis--delete 'decks `(= id ,id)))
+(defun gnosis-delete-deck (deck)
+ "Delete DECK."
+ (interactive (list (gnosis--get-deck-name)))
+ (gnosis--delete 'decks `(= name ,deck))
+ (message "Deleted deck %s" deck))
(cl-defun gnosis-add-note-mcq (&key deck question choices correct-answer tags)
"Create a NOTE with a list of multiple CHOICES.