summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-26 07:56:05 +0200
committerThanos Apollo <[email protected]>2024-01-26 07:56:05 +0200
commit28dde28c4a8c9fdf6551c9b44712225d99b20362 (patch)
tree8bc0a2fed8daa66b29e29739bd76007faab8c5b0 /gnosis.el
parente0f7d2887ab2de6e021356053fdc5c88aa6a3243 (diff)
Remove duplicate gnosis-db-init
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el15
1 files changed, 4 insertions, 11 deletions
diff --git a/gnosis.el b/gnosis.el
index 5e1a841..951e61b 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -147,10 +147,7 @@
:group 'gnosis-face)
(cl-defun gnosis-select (value table &optional (restrictions '1=1))
- "Select VALUE from TABLE, optionally with RESTRICTIONS.
-
-Use `gnosis-db-init' to initialize `gnosis-db' and create essential directories."
- (gnosis-db-init)
+ "Select VALUE from TABLE, optionally with RESTRICTIONS."
(emacsql gnosis-db `[:select ,value :from ,table :where ,restrictions]))
(cl-defun gnosis--create-table (table &optional values)
@@ -162,10 +159,7 @@ Use `gnosis-db-init' to initialize `gnosis-db' and create essential directories.
(emacsql gnosis-db `[:drop-table ,table]))
(cl-defun gnosis--insert-into (table values)
- "Insert VALUES to TABLE.
-
-Use `gnosis-db-init' to initialize `gnosis-db' and create essential directories."
- (gnosis-db-init)
+ "Insert VALUES to TABLE."
(emacsql gnosis-db `[:insert :into ,table :values ,values]))
(cl-defun gnosis-update (table value where)
@@ -1323,7 +1317,6 @@ review."
(defun gnosis-review ()
"Start gnosis review session."
(interactive)
- (gnosis-db-init)
(let ((review-type (completing-read "Review: " '("Due notes"
"Due notes of deck"
"Due notes of specified tag(s)"
@@ -1392,6 +1385,8 @@ review."
;; Create extras table
(gnosis--create-table 'extras gnosis-db-schema-extras)))
+(gnosis-db-init)
+
;; Gnosis mode ;;
;;;;;;;;;;;;;;;;;
@@ -1402,7 +1397,5 @@ review."
(display-line-numbers-mode 0)
:lighter " gnosis-mode")
-(gnosis-db-init)
-
(provide 'gnosis)
;;; gnosis.el ends here