From: David Maus <dmaus@ictsoc.de>
To: Richard Riley <rileyrg@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: exec code on task state progression
Date: Wed, 01 Sep 2010 07:55:39 +0200 [thread overview]
Message-ID: <87hbiaqa78.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <i4njiu$tt3$1@dough.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1608 bytes --]
Richard Riley wrote:
>What would be the best approach, if at all possible, to having org
>manage tasks which allow me set dates for a task to be scheduled and
>then let me manually progress/cycle that task and have it then invoke
>code/scripts?
Maybe something like this: Store the name of the function to be
executed in a property and define a function which is run in
`org-after-todo-state-change-hook' that reads this property and
executes the function if, say, the state was changed to "DONE".
(defun dmj:execute-func-after-todo-change ()
"Execute function in exec_func property if entry changes to DONE."
(when (string= state "DONE")
(let ((func (intern (org-entry-get nil "exec_func"))))
(if (fboundp func) (funcall func)))))
(add-hook 'org-after-todo-state-change-hook 'dmj:execute-func-after-todo-change)
For the update part you might want to look at el-get.el[1]:
,----
| Short Story: el-get allows you to install and manage elisp code for
| Emacs. It supports lots of differents types of sources and is able to
| install them, update them and remove them, but more importantly it
| will init them for you.
|
| That means it will care about require ing the features you need, load
| ing the files, setting the Info paths so that C-h i shows the new
| documentation you now depend on, and finally call your own :after
| function for you to setup the extension. Or call it a package.
`----
I did not try it (yet), but this looks sweet.
HTH,
-- David
[1] http://github.com/dimitri/el-get
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
prev parent reply other threads:[~2010-09-01 5:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 4:10 exec code on task state progression Richard Riley
2010-09-01 5:55 ` David Maus [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hbiaqa78.wl%dmaus@ictsoc.de \
--to=dmaus@ictsoc.de \
--cc=emacs-orgmode@gnu.org \
--cc=rileyrg@gmail.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.