From 801cda946148a06953930ca6ce0c62cadebfa5c7 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 14 Dec 2023 13:14:49 +0200 Subject: Move all custom variables at the start of code --- gnosis.el | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'gnosis.el') diff --git a/gnosis.el b/gnosis.el index 88cb4e8..16a8874 100644 --- a/gnosis.el +++ b/gnosis.el @@ -41,6 +41,31 @@ :group 'external :prefix "gnosis-") +(defcustom gnosis-interval '(1 3) + "Gnosis initial interval. + +Interval by which a new question is displayed or when it's ef is at 1.3. + +First item: First interval +Second item: Second interval." + :group 'gnosis + :type 'list) + +(defcustom gnosis-ef '(0.3 0.3) + "Gnosis easiness factor. + +First item : Increase factor +Second item: Decrease factor" + :group 'gnosis + :type 'list) + +(defcustom gnosis-ff 0.5 + "Gnosis forgetting factor. + +Used to calcuate new interval for failed questions." + :group 'gnosis + :type 'float) + (defvar gnosis-db (emacsql-sqlite (concat user-emacs-directory "gnosis.db"))) (cl-defun gnosis--select (value table &optional (restrictions '1=1)) @@ -231,31 +256,6 @@ TAGS are used to organize questions." ;; Gnosis Algorithm ;; ;;;;;;;;;;;;;;;;;;;;;; -(defcustom gnosis-interval '(1 3) - "Gnosis initial interval. - -Interval by which a new question is displayed or when it's ef is at 1.3. - -First item: First interval -Second item: Second interval." - :group 'gnosis - :type 'list) - -(defcustom gnosis-ef '(0.3 0.3) - "Gnosis easiness factor. - -First item : Increase factor -Second item: Decrease factor" - :group 'gnosis - :type 'list) - -(defcustom gnosis-ff 0.5 - "Gnosis forgetting factor. - -Used to calcuate new interval for failed questions." - :group 'gnosis - :type 'float) - (defun gnosis-current-date (&optional offset) "Return the current date in a list (year month day). Optional integer OFFSET is a number of days from the current date." -- cgit v1.2.3