From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: exec code on task state progression Date: Wed, 01 Sep 2010 07:55:39 +0200 Message-ID: <87hbiaqa78.wl%dmaus@ictsoc.de> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============1441194707==" Return-path: Received: from [140.186.70.92] (port=56410 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqgIU-0001oG-To for emacs-orgmode@gnu.org; Wed, 01 Sep 2010 01:55:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqgIT-0005CM-9z for emacs-orgmode@gnu.org; Wed, 01 Sep 2010 01:55:46 -0400 Received: from mysql1.xlhost.de ([213.202.242.106]:55906) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqgIT-0005C5-3x for emacs-orgmode@gnu.org; Wed, 01 Sep 2010 01:55:45 -0400 In-Reply-To: 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: Richard Riley Cc: emacs-orgmode@gnu.org --===============1441194707== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Wed_Sep__1_07:55:38_2010-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Wed_Sep__1_07:55:38_2010-1 Content-Type: text/plain; charset=US-ASCII 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 --pgp-sign-Multipart_Wed_Sep__1_07:55:38_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAkx96toACgkQma24O1pEeOabuAD/ceKCCYJXtRrnTQpm3GcBc7cQ odhyVnEC/Pz1mRH/zy4A+gNQVoacObMxlpSPuv2V1vU2D/g8K046qRHa1yy/DrrR =NdkT -----END PGP SIGNATURE----- --pgp-sign-Multipart_Wed_Sep__1_07:55:38_2010-1-- --===============1441194707== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1441194707==--