all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Schoepe <daniel@schoepe.org>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Dynamically generating todo entries
Date: Thu, 03 Nov 2011 00:35:22 +0100	[thread overview]
Message-ID: <87liry85dx.fsf@gilead.invalid> (raw)
In-Reply-To: <6130.1320275498@alphaville.americas.hpqcorp.net>

[-- Attachment #1: Type: text/plain, Size: 2320 bytes --]

On Wed, 02 Nov 2011 19:11:38 -0400, Nick Dokos <nicholas.dokos@hp.com> wrote:
> They are generally called (somewhat misleadingly) diary sexps - they are
> executed by org-agenda-get-sexps (assuming that they are in some agenda
> file) when the agenda is constructed, once for every day displayed: they
> do their things and that's that. They are mostly used to remind one of
> birthdays, anniversaries etc, hence diary sexps.

Ah, okay. Thanks.

> > By the way: Is there a resource describing what special variables are
> > available to such functions (I only know about date) and how their
> > output should look like? I couldn't find anything in the org manual.
> > 
> 
> What do you mean by special variables? Any variable in the dynamic chain
> is fair game: date is available because a caller (org-agenda-list) goes
> to the trouble of binding it. Any other variable in this function or in
> any parent of org-agenda-get-sexps can be used (unless it's shadowed),
> but I'm not sure what use they would be.

I was just wondering if there is a listing of such variables specific to
org and explicitly intended to be used by diary sexps (i.e. not an
implementation detail that might change without warning).

> The function just has to return a string: the agenda code takes care
> of printing the result in the agenda.

Okay, I guess their simplicity explains why I couldn't find more
information on them in the manual.

> Diary sexps is probably the wrong thing to use for what you want: I
> don't know how far you want to take it, but iiuc, the easiest thing to
> do is write a script (in your favorite language) that generates a file
> of entries, say foo.org:
> 
> ,----
> | 
> | * notmuch threads
> | 
> | ** TODO check out this thread [[some link][thread title]]
> | ** TODO check out that thread [[some other link][other thread title]]
> | ...
> `----
> 
> Then open it in emacs and include it in your agenda with C-c [

Now that you mention it, this is a perfectly obvious solution. :)

By advising (there does not seem to be a hook for that) `org-todo-list'
I can even avoid running that script in a cronjob and thus not allowing
the agenda to become out of sync with the actual notmuch tags.

Thank you for your time and your answers.

Cheers,
Daniel

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2011-11-02 23:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 21:27 Dynamically generating todo entries Daniel Schoepe
2011-11-02 23:11 ` Nick Dokos
2011-11-02 23:35   ` Daniel Schoepe [this message]
2011-11-03 10:49     ` Jonas Hörsch
2011-11-23 16:41     ` suvayu ali
2011-11-23 17:17       ` Daniel Schoepe

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

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

  git send-email \
    --in-reply-to=87liry85dx.fsf@gilead.invalid \
    --to=daniel@schoepe.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.