Ypo <ypun...@gmail.com> writes: > I have tried gptel inside emacs (I'm sorry, but I need to tell it) and I > got this code: > > #+begin_src emacs-lisp > (defun my-org-trigger-function (state) > "Remove all tags when state changes to 'DONE'" > (when (string= state "DONE") > ... > (add-hook 'org-trigger-hook 'my-org-trigger-function) > #+end_src > > Surprisingly 8-) it doesn't work. Any help?
org-trigger-hook is a variable defined in org.el. Documentation Hook for functions that are triggered by a state change. Each function gets as its single argument a property list with at least the following elements: (:type type-of-change :position pos-at-entry-start :from old-state :to new-state) Depending on the type, more properties may be present. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>