diff options
author | Thanos Apollo <[email protected]> | 2024-01-26 07:56:05 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-26 07:56:05 +0200 |
commit | 28dde28c4a8c9fdf6551c9b44712225d99b20362 (patch) | |
tree | 8bc0a2fed8daa66b29e29739bd76007faab8c5b0 /gnosis.el | |
parent | e0f7d2887ab2de6e021356053fdc5c88aa6a3243 (diff) |
Remove duplicate gnosis-db-init
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -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 |