John Wiegley <[EMAIL PROTECTED]> writes:

> Bastien <[EMAIL PROTECTED]> 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.

Yes, I like this very much.

We could have both a TRIGGER and a BLOCKER property.  The first one
would trigger actions on tasks.  The second one wouldn't let a change
appear on the task unless some tasks are in a specific state.

I tried to figure out how we could emulate the job of the BLOCKER
property with only TRIGGER and an option like `org-check-triggers',
saying that the action the TRIGGER is supposed to perform won't be
allowed if it's not performed *by the TRIGGER* itself -- therefore
enabling us to use "rigid" TRIGGERS and some kind of dependencies
checks.  

But I don't think it's really feasible -- not even a good idea.

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

Yes, sounds like a good idea.

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

I do agree the syntax I proposed was somewhat bloat.  Consider it
brain-dust after excitment! 

-- 
Bastien


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to