I like where org-learn is going. Good job. I am experiencing some issues
however (which could easily be me).
If I schedule an item for today, and then do an org-smart-reschedule, it seems
that it will always get scheduled for 4 days from now, regardless of either the
org-learn-fraction, or my input into org-smart-reschedule.
I would expect that if I enter a 0, it would reschedule the item much sooner
than if I entered a 5. Note that this is on an item that initially have empty
LEARN_DATA.
Also, I've attached a patch. It adds documentation to org-smart-reschedule,
and defines an alias to it called "org-learn-reschedule".
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
John Wiegley
Sent: October 25, 2009 3:49 PM
To: Richard Riley
Cc: Org-mode Mode
Subject: [Orgmode] Re: New module: org-learn, incremental reading
On Oct 25, 2009, at 5:46 PM, Richard Riley wrote:
> Just trying this and got
>
> org-smart-reschedule: Symbol's value as variable is void:
> learning-fraction
>
> when I enter 0-3. It worked with 5.
Attached is an updated version.
John
The information contained in this message is confidential. It is intended to be
read only by the individual or entity named above or their designee. If the
reader of this message is not the intended recipient, you are hereby notified
that any distribution of this message, in any form, is strictly prohibited. If
you have received this message in error, please immediately notify the sender
and delete or destroy any copy of this message.
*** c:/Documents and Settings/jonathana/Local Settings/Temporary Internet
Files/Content.Outlook/TP585W2O/org-learn (2).el Sun Oct 25 15:51:03 2009
--- c:/Emacs/my-site-lisp/org-learn.el Tue Oct 27 09:34:26 2009
***************
*** 157,163 ****
--- 175,196 ----
ef of-matrix)))))
(defun org-smart-reschedule (quality)
+ "Reschedule the item based on how well the user remembered it.
+
+ The QUALITY Scale works like this:
+
+ 0-2 Means you have forgotten the item.
+ 3-5 Means you have remembered the item.
+
+ 0 - Completely forgot.
+ 1 - Even after seeing the answer, it still took a bit to sink in.
+ 2 - After seeing the answer, you remembered it.
+ 3 - It took you awhile, but you finally remembered.
+ 4 - After a little bit of thought you remembered.
+ 5 - You remembered the item really easily."
(interactive "nHow well did you remember the information (on a scale of
0-5)? ")
+ (when (not (eq major-mode 'org-mode))
+ (error "You must be in org-mode to use this!"))
(let* ((learn-str (org-entry-get (point) "LEARN_DATA"))
(learn-data (or (and learn-str
(read learn-str))
***************
*** 171,178 ****
(org-entry-put (point) "LEARN_DATA" (prin1-to-string learn-data))
(if (= 0 (nth 0 learn-data))
(org-schedule t)
! (org-schedule nil (time-add (current-time)
! (days-to-time (nth 0 learn-data)))))))
(provide 'org-learn)
--- 204,213 ----
(org-entry-put (point) "LEARN_DATA" (prin1-to-string learn-data))
(if (= 0 (nth 0 learn-data))
(org-schedule t)
! (org-schedule nil (time-add (current-time)
! (days-to-time (nth 0 learn-data)))))))
!
! (defalias 'org-learn-reschedule 'org-smart-reschedule)
(provide 'org-learn)
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode