From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp10.migadu.com ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms9.migadu.com with LMTPS
	id GEjhCcrKmmS3AwAASxT56A
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 27 Jun 2023 13:40:58 +0200
Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp10.migadu.com with LMTPS
	id OAqrCMrKmmQYrAAAG6o9tA
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 27 Jun 2023 13:40:58 +0200
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id D52FE200C4
	for <larch@yhetil.org>; Tue, 27 Jun 2023 13:40:57 +0200 (CEST)
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20221208 header.b=ETeMdjvC;
	dmarc=pass (policy=none) header.from=gmail.com;
	spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1687866057;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:in-reply-to:in-reply-to:
	 references:references:list-id:list-help:list-unsubscribe:
	 list-subscribe:list-post:dkim-signature;
	bh=O1yEckFWyHRim9pBK8ee09y6+B3ZKUrEXVz5qHuDKpk=;
	b=EWANfz2MS5JKQpoHFfg5DQfdBKzhbrlfbOCqrfbJCrNIOD+hkxULQmcQoL02InfO/XNrfw
	lEhpYRZMpI1lpjbyWhEZNYrA5PVWsMkxuuIbfQAXrPvmU7SLi7m0lA0vC1y7jHyKJF+dXS
	BqU/xrr/igRVkaRP2ArdWBpt+s8T2M7Nw3crsrttv2ociUHNgcjll/DQb5MOU7FVpFh17Z
	x6p+e6Q3bfK+ldC+eLysnge6oxK7FfhkkeePhO+/NZ+xhEt2npAoJkHYd7S8MGjem8WwNP
	gOaV1Uk7csfnUaG6XdNnUK+V1a4HRK+9nVLKy+ZZHH2ZYlzGlod7IL//KY3B5Q==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20221208 header.b=ETeMdjvC;
	dmarc=pass (policy=none) header.from=gmail.com;
	spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687866057; a=rsa-sha256; cv=none;
	b=lL3mln7TFnYPrUKvxupwq4L03V6KDKT1mZe1xTMv2lSxZe+cFQkYSC3EY5cdRdTTO6VCVY
	dgSAQ0IP2sxeRoMyy6kscfffhBdP96CJVUu/lxZZ6W9gdmfRIhKvf/NcUxQokxyf9iomN4
	EGVAWuoGfMz6wrS4ky1+fuoq247GzxWge7ZkbSqrPsH67NJY8TDm7JqMZ6h5p507oeQ6mP
	sHew3RD7pHbffl0OlV4AYtOcbZUgqshe542ouFgYtxPN5zFD2YjtKjRRZCvIvEkSeDyqEy
	lQKJGa/9YE37rloodZFsMf2q7gTx5RFc5pvxyWEMwyF7YJcUnfNyZ6/3zVEHHQ==
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces@gnu.org>)
	id 1qE73B-0005FK-0d; Tue, 27 Jun 2023 07:40:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ypuntot@gmail.com>) id 1qE738-0005F5-Gw
 for emacs-orgmode@gnu.org; Tue, 27 Jun 2023 07:39:58 -0400
Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ypuntot@gmail.com>) id 1qE737-0001un-0T
 for emacs-orgmode@gnu.org; Tue, 27 Jun 2023 07:39:58 -0400
Received: by mail-wr1-x435.google.com with SMTP id
 ffacd0b85a97d-313f363a6f1so2049348f8f.1
 for <emacs-orgmode@gnu.org>; Tue, 27 Jun 2023 04:39:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1687865995; x=1690457995;
 h=in-reply-to:from:references:cc:content-language:subject:user-agent
 :mime-version:date:message-id:from:to:cc:subject:date:message-id
 :reply-to; bh=O1yEckFWyHRim9pBK8ee09y6+B3ZKUrEXVz5qHuDKpk=;
 b=ETeMdjvC08/2hGpe2ZnVMdsxrItNecUNbM3DeOaboce5xswe0qg9UeuotHt0KUYdly
 lnFWxvgsSbvu26PcyluJSP2BI51DXJ1YrynIBwdkAOCrM2U8xZMkIGBKWzSNJQJVc9vp
 lBbYtBVyfw9ZqYqstgn36Lfoi76o9hQ66Dj6TvlZZc0HI5GRSROXK5yAPG5fqkjrfngn
 TlpkxQQO20BYonIEml/o+/+qUgfYhGcCG6Sy0jLLOUfVKdZaLnzyvlFHoaQ+qx8BTW+G
 6ky6wWExbNPJwkOjFCpZ1OHFAx/MsSLlcBonJXopXELvS8JQlSnE4PW1jOO7Qrrm/Ge+
 lMSA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1687865995; x=1690457995;
 h=in-reply-to:from:references:cc:content-language:subject:user-agent
 :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to;
 bh=O1yEckFWyHRim9pBK8ee09y6+B3ZKUrEXVz5qHuDKpk=;
 b=Gd5QlV8M2YNlYW3lT2yiUX3bokySrEJYgZIV0K3KyYTaowpBU8SUFZ4PRnyOpZXksf
 0VzO8gBAmCudr+gaa0QJz/TWDRHh3yAQFzrb7fs2f9cRPWL5csN3LcH0Pw8OTh4+dnJw
 mnWVeSqynlSZHhUbVY05KiTYRh3lHM2Tt0M7efMhEiSS/JZVld1na5yokIMBKYHnIK1U
 6/Xdw+HKi4rMbZUxfHY/CXmmD0imi6FGft6e6ZKya5CioApTmGtpDW83snZ8VZK8amDx
 +uiJrSOYlTnoua1PV/HxaybaK5bjPpvmB3h5SPHH8lpH045LOQ+CJdRGf27nh5y8ySPb
 yJaA==
X-Gm-Message-State: AC+VfDwB32PFI7CPpMrRQ2VAkCnOdgBmnUyHZUUpycxUTKdrrlxsdn9Y
 Zjh6v227UHt7YMB3nSr4IGnBOY9mBqY=
X-Google-Smtp-Source: ACHHUZ49oHuWoAFGQrlUtXh2kfxBqppjZgLRJrFloJezSC78dDOYxKMwsJ4/RU/7dL6etBOGaPs02w==
X-Received: by 2002:a5d:5344:0:b0:313:df09:ad04 with SMTP id
 t4-20020a5d5344000000b00313df09ad04mr9062293wrv.57.1687865995166; 
 Tue, 27 Jun 2023 04:39:55 -0700 (PDT)
Received: from [192.168.1.111] (59.82-130-209.dynamic.clientes.euskaltel.es.
 [82.130.209.59]) by smtp.gmail.com with ESMTPSA id
 e10-20020a056000194a00b0031134bcdacdsm10203953wry.42.2023.06.27.04.39.54
 for <emacs-orgmode@gnu.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 27 Jun 2023 04:39:54 -0700 (PDT)
Content-Type: multipart/alternative;
 boundary="------------bo2nmZ5OwRN77yGgopGnO7Oa"
Message-ID: <b996fb49-3876-1fff-e5c6-f9be62099431@gmail.com>
Date: Tue, 27 Jun 2023 13:39:54 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
 Thunderbird/91.13.1
Subject: Re: org-todo-state-tags-triggers not working with regexp?
Content-Language: en-GB
Cc: Org-mode <emacs-orgmode@gnu.org>
References: <3ce0b3d9-b423-60af-c7a3-904acdb64c46@gmail.com>
 <87y1kqns3l.fsf@localhost>
From: Ypo <ypuntot@gmail.com>
In-Reply-To: <87y1kqns3l.fsf@localhost>
Received-SPF: pass client-ip=2a00:1450:4864:20::435;
 envelope-from=ypuntot@gmail.com; helo=mail-wr1-x435.google.com
X-Spam_score_int: -11
X-Spam_score: -1.2
X-Spam_bar: -
X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, MISSING_HEADERS=1.021, NICE_REPLY_A=-0.103,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-orgmode@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
X-Migadu-Country: US
X-Migadu-Flow: FLOW_IN
X-Migadu-Scanner: scn0.migadu.com
X-Migadu-Spam-Score: -4.92
X-Spam-Score: -4.92
X-Migadu-Queue-Id: D52FE200C4
X-TUID: 3Pc92bZGHEWI

This is a multi-part message in MIME format.
--------------bo2nmZ5OwRN77yGgopGnO7Oa
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

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'.
>
--------------bo2nmZ5OwRN77yGgopGnO7Oa
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p><font face="Arial">Hi, Ihor.</font></p>
    <p><font face="Arial">I have tried gptel inside emacs (I'm sorry,
        but I need to tell it) and I got this code:</font></p>
    <p><font face="Arial">#+begin_src emacs-lisp<br>
        (defun my-org-trigger-function (state)<br>
          "Remove all tags when state changes to 'DONE'"<br>
          (when (string= state "DONE")<br>
            (org-toggle-tag nil 'remove)))<br>
        <br>
        (add-hook 'org-trigger-hook 'my-org-trigger-function)<br>
        #+end_src</font></p>
    <p><font face="Arial">Surprisingly 8-) it doesn't work. Any help?</font></p>
    <p><font face="Arial">Best regards</font><br>
    </p>
    <div class="moz-cite-prefix">El 11/06/2023 a las 13:41, Ihor
      Radchenko escribió:<br>
    </div>
    <blockquote type="cite" cite="mid:87y1kqns3l.fsf@localhost">
      <pre class="moz-quote-pre" wrap="">Ypo <a class="moz-txt-link-rfc2396E" href="mailto:ypuntot@gmail.com">&lt;ypuntot@gmail.com&gt;</a> writes:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">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"))))
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Yes, regexps are not supported in `org-todo-state-tags-triggers'.
You can use `org-trigger-hook'.

</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>

--------------bo2nmZ5OwRN77yGgopGnO7Oa--