From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-trigger-hook vs. org-after-todo-state-change-hook Date: Wed, 26 Aug 2015 21:02:35 -0400 Message-ID: <8737z55ys4.fsf@pierrot.dokosmarshall.org> References: <878u8ygkxz.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUlag-0002Q6-Fl for emacs-orgmode@gnu.org; Wed, 26 Aug 2015 21:02:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUlad-0005l5-9I for emacs-orgmode@gnu.org; Wed, 26 Aug 2015 21:02:54 -0400 Received: from plane.gmane.org ([80.91.229.3]:51149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUlad-0005ks-2D for emacs-orgmode@gnu.org; Wed, 26 Aug 2015 21:02:51 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZUlaZ-0007mU-NB for emacs-orgmode@gnu.org; Thu, 27 Aug 2015 03:02:47 +0200 Received: from pool-108-20-41-232.bstnma.fios.verizon.net ([108.20.41.232]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Aug 2015 03:02:47 +0200 Received: from ndokos by pool-108-20-41-232.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Aug 2015 03:02:47 +0200 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: emacs-orgmode@gnu.org Marcin Borkowski writes: > org-trigger-hook vs. org-after-todo-state-change-hook: > > which one to choose? (I want to execute some code when an item is > marked as done.) Why do both of them exist? > The trigger hook functions take a proplist argument which provides a lot more information to the function than what is available to the after-todo-state-change functions (which take no argument): the latter can only know what the new state is going to be (through a global variable); as a result, they can be much simpler than the trigger functions, so if you don't need the extra info, after-todo is probably the way to go. -- Nick