emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dan Davison <davison@stats.ox.ac.uk>
To: Paul Sexton <psexton@xnet.co.nz>
Cc: emacs-orgmode@gnu.org
Subject: Re: Drill mode for org-learn
Date: Fri, 30 Jul 2010 12:20:36 -0400	[thread overview]
Message-ID: <8762zx0wmj.fsf@stats.ox.ac.uk> (raw)
In-Reply-To: <loom.20100730T071518-886@post.gmane.org> (Paul Sexton's message of "Fri, 30 Jul 2010 05:26:08 +0000 (UTC)")

Paul Sexton <psexton@xnet.co.nz> writes:

> 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.


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. 
>
> 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

      reply	other threads:[~2010-07-30 16:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30  5:26 Drill mode for org-learn Paul Sexton
2010-07-30 16:20 ` Dan Davison [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762zx0wmj.fsf@stats.ox.ac.uk \
    --to=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=psexton@xnet.co.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).