From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Sexton Subject: Drill mode for org-learn Date: Fri, 30 Jul 2010 05:26:08 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=46577 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oei76-00086U-Np for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 01:26:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oei75-0007hI-G2 for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 01:26:32 -0400 Received: from lo.gmane.org ([80.91.229.12]:60091) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oei75-0007h2-4l for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 01:26:31 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oei72-0006El-PD for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 07:26:29 +0200 Received: from rp.young.med.auckland.ac.nz ([130.216.140.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Jul 2010 07:26:28 +0200 Received: from psexton by rp.young.med.auckland.ac.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Jul 2010 07:26:28 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I have nearly finished a basic "drill mode" for org-learn. It works a bit like Anki/Mnemosyne. When invoked, it scans files for topics which either have the tag :question:, or have the LEARN_DATA property (set by org-learn), and which are either unscheduled (ie new) or are not scheduled in the future. It shuffles them, picks a random subset if 'org-learn-maximum-items-per-drill-session' is set, and presents them one by one. The user presses a key, then presses a key 0-5 to rate their recall. 'org-smart-reschedule' is called for every reviewed item at the end of the test. Example topics which it understands: 1. The body under the heading tagged :question: is shown, with the :back: (ie "back of the card") subsection hidden. * Greeting Q1 :question: What is your name? (informal) ** Answer :back: ¿Cómo te llamas? 2. A card with both a front and a back. One side will be shown at random, with the other hidden. * Noun :question: ** Front :front: el gato ** Back :back: the cat 3. Cloze deletion. Text within SINGLE square brackets is obscured with a special font. * Grammar rule :question: To form an adverb from an adjective, add [-mente] to the [feminine] (gender) form of the adjective. I have a slight problem however. I don't know how to "record" headings so I can revisit them later. I need something like: (org-map-entries (lambda () (push (org-save-this-heading) headings)) "" files) (dolist (heading headings) (jump-to-heading heading) ...) Saving the buffer position does not work because each call to org-smart-reschedule alters the contents of the buffer. If/when I solve this problem, I should be able to release this code. Paul