all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-trigger-hook vs. org-after-todo-state-change-hook
@ 2015-08-26 14:53 Marcin Borkowski
  2015-08-27  1:02 ` Nick Dokos
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Borkowski @ 2015-08-26 14:53 UTC (permalink / raw)
  To: Org-Mode mailing list

Hi all,

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?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: org-trigger-hook vs. org-after-todo-state-change-hook
  2015-08-26 14:53 org-trigger-hook vs. org-after-todo-state-change-hook Marcin Borkowski
@ 2015-08-27  1:02 ` Nick Dokos
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Dokos @ 2015-08-27  1:02 UTC (permalink / raw)
  To: emacs-orgmode

Marcin Borkowski <mbork@mbork.pl> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-27  1:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 14:53 org-trigger-hook vs. org-after-todo-state-change-hook Marcin Borkowski
2015-08-27  1:02 ` Nick Dokos

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.