From: 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 13:39:54 +0200 [thread overview]
Message-ID: <b996fb49-3876-1fff-e5c6-f9be62099431@gmail.com> (raw)
In-Reply-To: <87y1kqns3l.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
Hi, Ihor.
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")
(org-toggle-tag nil 'remove)))
(add-hook 'org-trigger-hook 'my-org-trigger-function)
#+end_src
Surprisingly 8-) it doesn't work. Any help?
Best regards
El 11/06/2023 a las 13:41, Ihor Radchenko escribió:
> Ypo<ypuntot@gmail.com> writes:
>
>> I would like to remove every tag when changing to done state.
>>
>> This is not working:
>>
>> '(org-todo-state-tags-triggers '((done ("(.*)"))))
>>
>> This works though:
>>
>> '(org-todo-state-tags-triggers '((done ("Atag"))))
> Yes, regexps are not supported in `org-todo-state-tags-triggers'.
> You can use `org-trigger-hook'.
>
[-- Attachment #2: Type: text/html, Size: 1708 bytes --]
next prev parent reply other threads:[~2023-06-27 11:40 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 [this message]
2023-06-27 12:05 ` Ihor Radchenko
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=b996fb49-3876-1fff-e5c6-f9be62099431@gmail.com \
--to=ypuntot@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).