From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Drill mode for org-learn Date: Fri, 30 Jul 2010 12:20:36 -0400 Message-ID: <8762zx0wmj.fsf@stats.ox.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=51519 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OesKF-0005Sk-ON for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 12:20:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OesKB-0003x2-Hm for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 12:20:47 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:45947) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OesKB-0003wl-BI for emacs-orgmode@gnu.org; Fri, 30 Jul 2010 12:20:43 -0400 In-Reply-To: (Paul Sexton's message of "Fri, 30 Jul 2010 05:26:08 +0000 (UTC)") 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: Paul Sexton Cc: emacs-orgmode@gnu.org Paul Sexton writes: > I have nearly finished a basic "drill mode" for org-learn. It works a bit= =20 > like Anki/Mnemosyne. > > When invoked, it scans files for topics which either have the tag :questi= on:, > or have the LEARN_DATA property (set by org-learn), and which are either= =20 > unscheduled (ie new) or are not scheduled in the future. > > It shuffles them, picks a random subset if=20 > '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=20 > 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:= =20 > (ie "back of the card") subsection hidden. > > * Greeting Q1 :question: > What is your name? (informal) > ** Answer :back: > =C2=BFC=C3=B3mo te llamas? > > 2. A card with both a front and a back. One side will be shown at random,= =20 > 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=20 > 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. Hi Paul, This sounds like it could be solved by using 'markers'? (info "elisp(Markers)") Carsten uses them quite a bit in org; try grep'ing for `move-marker' and `make-marker'. Dan > > If/when I solve this problem, I should be able to release this code.=20 > > Paul > > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode