summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el31
1 files changed, 11 insertions, 20 deletions
diff --git a/gnosis.el b/gnosis.el
index 9fc9f67..4c366bc 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -783,15 +783,6 @@ DATE is a list of the form (year month day)."
(time-date (encode-time 0 0 0 (nth 2 date) (nth 1 date) (nth 0 date))))
(not (time-less-p time-now time-date))))
-(defun gnosis-due-tags ()
- "Return a list of due note tags."
- (let ((due-notes (gnosis-review-get-due-notes)))
- (cl-remove-duplicates
- (cl-mapcan (lambda (note-id)
- (gnosis-get-note-tags note-id))
- due-notes)
- :test #'equal)))
-
(cl-defun gnosis-tag-prompt (&key (prompt "Selected tags") (match nil) (due nil))
"PROMPT user to select tags, until they enter `q'.
@@ -805,7 +796,7 @@ Returns a list of unique tags."
(tag ""))
(while (not (string= tag "q"))
(setf tag (completing-read (concat prompt (format " %s (q for quit): " tags))
- (cons "q" (if due (gnosis-due-tags)
+ (cons "q" (if due (gnosis-review-get-due-tags)
(gnosis-get-tags--unique)))
nil match))
(unless (or (string= tag "q") (member tag tags))
@@ -837,6 +828,15 @@ well."
when (gnosis-review-is-due-p note)
collect note)))
+(defun gnosis-review-get-due-tags ()
+ "Return a list of due note tags."
+ (let ((due-notes (gnosis-review-get-due-notes)))
+ (cl-remove-duplicates
+ (cl-mapcan (lambda (note-id)
+ (gnosis-get-note-tags note-id))
+ due-notes)
+ :test #'equal)))
+
(defun gnosis-review--algorithm (id success)
"Return next review date & ef for note with value of id ID.
@@ -860,15 +860,6 @@ Returns a list of the form ((yyyy mm dd) ef)."
:fails-t t-fails
:initial-interval initial-interval)))
-(defun gnosis-review-due-notes--with-tags ()
- "Return a list of due note tags."
- (let ((due-notes (gnosis-review-get-due-notes)))
- (cl-remove-duplicates
- (cl-mapcan (lambda (note-id)
- (gnosis-get-note-tags note-id))
- due-notes)
- :test #'equal)))
-
(defun gnosis-review--get-offset (id)
"Return offset for note with value of id ID."
(let ((last-rev (gnosis-get 'last-rev 'review-log `(= id ,id))))
@@ -1304,7 +1295,7 @@ The purpose of this function is to create a full deck with its
associated notes in `gnosis-db', ready for further processing or
review."
(gnosis-add-deck (symbol-name deck))
- (sit-for 0.1) ;; wait for low-spec computers to create deck
+ (sit-for 0.1) ;;
(cl-loop for note in notes
do (gnosis-add-note-fields (symbol-name deck)
(plist-get note :type)