branch: elpa/gnosis
commit 91a412e6dacc0a39802e7fa03a94aa45e1c15dfa
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>

    Remove dead code.
---
 gnosis-algorithm.el |  6 ------
 gnosis-dashboard.el | 36 +-----------------------------------
 gnosis-review.el    |  6 ------
 3 files changed, 1 insertion(+), 47 deletions(-)

diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el
index 0733500007..f82583d767 100644
--- a/gnosis-algorithm.el
+++ b/gnosis-algorithm.el
@@ -107,12 +107,6 @@ A value of 0.1 means +/- 10%%.  Set to 0 to disable."
   :group 'gnosis
   :type 'float)
 
-(defun gnosis-algorithm-replace-at-index (index new-item list)
-  "Replace item at INDEX with NEW-ITEM in LIST."
-  (cl-loop for item in list
-          for i from 0
-          collect (if (= i index) new-item item)))
-
 (defun gnosis-algorithm-round-items (list)
   "Round all items in LIST to 2 decimal places."
   (cl-loop for item in list
diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el
index 0dd3f593dc..9a47e199c9 100644
--- a/gnosis-dashboard.el
+++ b/gnosis-dashboard.el
@@ -27,7 +27,6 @@
 
 ;;; Code:
 
-(require 'gnosis-monkeytype)
 (require 'gnosis)
 (require 'gnosis-tl)
 (require 'org-gnosis)
@@ -212,10 +211,6 @@ DATES: Dates in the activity log, a list of dates in (YYYY 
MM DD)."
       (cl-incf count))
     (number-to-string count)))
 
-(defun gnosis-dashboard-output-average-rev ()
-  "Output the average daily themata reviewed as a string for the dashboard."
-  (format "%.2f" (gnosis-calculate-average-daily-reviews)))
-
 (defun gnosis-dashboard-edit-thema ()
   "Edit thema with ID."
   (interactive)
@@ -669,6 +664,7 @@ GEN: load generation — no-op if stale."
   (cl-assert (listp thema-ids) t "`thema-ids' must be a list of thema ids.")
   (cl-incf gnosis-dashboard--load-generation)
   (pop-to-buffer-same-window gnosis-dashboard-buffer-name)
+  (goto-char (point-min))
   (gnosis-dashboard-enable-mode)
   ;; Disable other dashboard modes
   (gnosis-dashboard-nodes-mode -1)
@@ -997,28 +993,6 @@ When called with a prefix, unsuspend all themata of deck."
             (not (eq major-mode 'gnosis-dashboard-mode)))
     (gnosis-dashboard-mode)))
 
-(cl-defun gnosis-dashboard--search (&optional dashboard-type (thema-ids nil))
-  "Display gnosis dashboard.
-
-THEMA-IDS: List of thema ids to display on dashboard.  When nil, prompt
-for dashboard type.
-
-DASHBOARD-TYPE: either Themata or Decks to display the respective dashboard."
-  (interactive)
-  (let ((dashboard-type (or dashboard-type
-                           (cadr (read-multiple-choice
-                                  "Display dashboard for:"
-                                  '((?n "themata")
-                                    (?d "decks")
-                                    (?t "tags")
-                                    (?s "search")))))))
-    (if thema-ids (gnosis-dashboard-output-themata thema-ids)
-      (pcase dashboard-type
-       ("themata" (gnosis-dashboard-output-themata (gnosis-collect-thema-ids)))
-       ("decks" (gnosis-dashboard-output-decks))
-       ("tags"  (gnosis-dashboard-output-themata (gnosis-collect-thema-ids 
:tags t)))
-       ("search" (gnosis-dashboard-search-thema))))))
-
 (defun gnosis-dashboard-mark-toggle ()
   "Toggle mark on the current item in the tabulated-list."
   (interactive)
@@ -1075,14 +1049,6 @@ DASHBOARD-TYPE: either Themata or Decks to display the 
respective dashboard."
     (gnosis-dashboard--remove-entries gnosis-dashboard--selected-ids)
     (setq gnosis-dashboard--selected-ids nil)))
 
-(defun gnosis-dashboard-marked-suspend ()
-  "Suspend marked thema entries."
-  (interactive)
-  (when (y-or-n-p "Toggle SUSPEND on selected themata?")
-    (gnosis-toggle-suspend-themata gnosis-dashboard--selected-ids nil)
-    (gnosis-dashboard--update-entries gnosis-dashboard--selected-ids)
-    (setq gnosis-dashboard--selected-ids nil)))
-
 (defun gnosis-dashboard-bulk-link ()
   "Bulk link string in marked or all displayed themata."
   (interactive nil gnosis-dashboard-themata-mode)
diff --git a/gnosis-review.el b/gnosis-review.el
index e7dfc8e69e..1bedc83585 100644
--- a/gnosis-review.el
+++ b/gnosis-review.el
@@ -266,12 +266,6 @@ Optionally, provide THEMA-IDS of which the overdue ones 
will be returned."
 
 ;;; Algorithm bridge
 
-(defun gnosis-review-last-interval (id)
-  "Return last review interval for thema ID."
-  (let* ((last-rev (gnosis-get 'last-rev 'review-log `(= id ,id)))
-        (rev-date (gnosis-get 'next-rev 'review-log `(= id ,id))))
-    (gnosis-algorithm-date-diff last-rev rev-date)))
-
 (defun gnosis-review-algorithm (id success)
   "Return next review date & gnosis for thema with value of id ID.
 

Reply via email to