emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Ypo <ypuntot@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: org-todo-state-tags-triggers not working with regexp?
Date: Tue, 27 Jun 2023 12:05:44 +0000	[thread overview]
Message-ID: <87o7l1az53.fsf@localhost> (raw)
In-Reply-To: <b996fb49-3876-1fff-e5c6-f9be62099431@gmail.com>

Ypo <ypuntot@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>


  reply	other threads:[~2023-06-27 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-11 11:21 org-todo-state-tags-triggers not working with regexp? Ypo
2023-06-11 11:41 ` Ihor Radchenko
2023-06-27 11:39   ` Ypo
2023-06-27 12:05     ` Ihor Radchenko [this message]
2023-06-29 15:10       ` Ypo

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7l1az53.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=ypuntot@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).