From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Wiegley Subject: Re: depending TODOs, scheduling following TODOs automatically Date: Mon, 08 Oct 2007 23:03:39 -0400 Message-ID: References: <6dbd4d000710080626i52f0f0t9354addc33c0efee@mail.gmail.com> <20071008134353.GA10774@odin.demosthenes.org> <877ilxmimn.fsf@bzg.ath.cx> <20071008202652.GA18426@atlantic.linksys.moosehall> <87k5pxnicj.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1If5Nw-0004fp-Qf for emacs-orgmode@gnu.org; Mon, 08 Oct 2007 23:03:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1If5Nu-0004fb-CW for emacs-orgmode@gnu.org; Mon, 08 Oct 2007 23:03:51 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1If5Nu-0004fX-5H for emacs-orgmode@gnu.org; Mon, 08 Oct 2007 23:03:50 -0400 Received: from johnwiegley.com ([208.70.150.153] helo=mail.johnwiegley.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1If5Nt-0006ON-QJ for emacs-orgmode@gnu.org; Mon, 08 Oct 2007 23:03:49 -0400 Received: from Hermes.local (unknown [72.22.154.84]) by mail.johnwiegley.com (Postfix) with ESMTP id 8E5114224CD for ; Mon, 8 Oct 2007 22:03:47 -0500 (CDT) In-Reply-To: <87k5pxnicj.fsf@bzg.ath.cx> (Bastien's message of "Tue\, 09 Oct 2007 03\:15\:56 +0100") 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 Bastien writes: > We could use the TODO keywords instead of "SEND" as a way to say that > reaching a particular todo state should trigger some kind of action. How about just having generalized Lisp triggers: :PROPERTIES: :TRIGGER: (lambda (previous new) (if (string= (assoc "TODO" new) "DONE") (org-find-and-schedule "regexp matching task" date))) :END: In this example, previous and new are associative lists containing all of the state information applicable to an entry. This kind of mechanism would allow Carsten to come up with a small library of org-mode Lisp functions for programmatically manipulating tasks simply by specifying a regular expression, or a relative offset, to "locate" them. I would far prefer this to a specialized syntax, which in the end would require so complexity as to become a domain-specific language in itself. John