From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Schoepe Subject: Re: Dynamically generating todo entries Date: Thu, 03 Nov 2011 00:35:22 +0100 Message-ID: <87liry85dx.fsf@gilead.invalid> References: <87obwu8bbn.fsf@gilead.invalid> <6130.1320275498@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLkLG-0006QP-G5 for emacs-orgmode@gnu.org; Wed, 02 Nov 2011 19:35:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLkLF-0002B6-77 for emacs-orgmode@gnu.org; Wed, 02 Nov 2011 19:35:34 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:53964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLkLE-0002B1-Ps for emacs-orgmode@gnu.org; Wed, 02 Nov 2011 19:35:33 -0400 Received: by faaf16 with SMTP id f16so1269999faa.0 for ; Wed, 02 Nov 2011 16:35:31 -0700 (PDT) In-Reply-To: <6130.1320275498@alphaville.americas.hpqcorp.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 02 Nov 2011 19:11:38 -0400, Nick Dokos wrot= e: > 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. > >=20 >=20 > 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: >=20 > ,---- > |=20 > | * notmuch threads > |=20 > | ** TODO check out this thread [[some link][thread title]] > | ** TODO check out that thread [[some other link][other thread title]] > | ... > `---- >=20 > 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 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJOsdO6AAoJEIaTAtce+Z+JCscQALgNtGjUutwvDZZatobC/ocQ OwWHj5mxFyG+LAGZCkfOC+a2FcZ2FZECm9a0WLE1dLGWUDt2wq4ARtPRimZvoTwX KVMNRcHZE4QyOL0NMHsWt9V3XM01frXU3eTLTlddimeMvb8RBbOanVzLZFJXldkl 1PI42Ni7A0sa9nWj3P2G4q2ACxQidF5eyfQVcbUIPtv9kQVjheuc7v7QBhzIRM12 rsoexWRWFeE+p4AjQe8cm5bBaLRRbIaUe9O7gIpuJBARreAL5YxkjKjcBt/8SSQr jkV3rNTWHRDM2Xu5dX62RH2JZ4lxXDFrT4iifTfMgIwtJjmtuEwhXW8aaX2l/bkl OV/HZtr1NxaknFRh0EAvFS5VO/H1fwgRFLLcRaemu65o7uHKoFFgFNIV6jlnSdsY EsHmyZIqTv9vNDBDV6RNPIcwzuUmVT6CBKig7EGGwI9XC4/n+laguqFtU4I9d8p5 v5nCQzW3ZWCDw1CcPix9LVC0XJ26koUnwqKEnpAXkbctR1SWLpeB8wGE6g132gfV sMXNvlVdO1skeUN/ukzJa3GZcu4ti7HQdWIwON+guLxhKw99ameoB71i2a3m7jbz FpOxBG/ejilloNtSmh2FZBmfBrJfHUcjS20cW9VjGngChPFCn6cU4mV5iZVlxS7s og5D4+yq1DBHR+N/J47k =9/Sy -----END PGP SIGNATURE----- --=-=-=--