summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnosis.el15
1 files changed, 5 insertions, 10 deletions
diff --git a/gnosis.el b/gnosis.el
index fa67683..214ecf7 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -240,15 +240,10 @@ TAGS are used to organize questions."
"Create notes content table."
(interactive)
;;(make-directory (concat user-emacs-directory "gnosis"))
- (condition-case nil
- (gnosis--drop-table 'notes)
- (error (message "No NOTES table to drop.")))
- (condition-case nil
- (gnosis--drop-table 'decks)
- (error (message "No DECKS table to drop.")))
- (condition-case nil
- (gnosis--drop-table 'review)
- (error (message "No REVIEW table to drop.")))
+ (dolist (table '(notes decks review review-log))
+ (condition-case nil
+ (gnosis--drop-table table)
+ (error (message "No %s table to drop." table))))
;; Enable foreign_keys
(emacsql gnosis-db "PRAGMA foreign_keys = ON")
;; Create decks table
@@ -273,7 +268,7 @@ TAGS are used to organize questions."
;; Gnosis Algorithm ;;
;;;;;;;;;;;;;;;;;;;;;;
-(defun gnosis-current-date (&optional offset)
+(defun gnosis-date-current (&optional offset)
"Return the current date in a list (year month day).
Optional integer OFFSET is a number of days from the current date."
(let* ((now (decode-time))