emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-todo-state-tags-triggers not working with regexp?


From: Ypo
Subject: Re: org-todo-state-tags-triggers not working with regexp?
Date: Tue, 27 Jun 2023 13:39:54 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1

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'.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]