From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MC1XMpXPmmQGzgAASxT56A (envelope-from ) for ; Tue, 27 Jun 2023 14:01:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YPVkMZXPmmRPMgAAG6o9tA (envelope-from ) for ; Tue, 27 Jun 2023 14:01:25 +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 21476E64C for ; Tue, 27 Jun 2023 14:01:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE7NN-0004Vx-QM; Tue, 27 Jun 2023 08:00:53 -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 ) id 1qE7NM-0004VC-2x for emacs-orgmode@gnu.org; Tue, 27 Jun 2023 08:00:52 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qE7NK-0006ql-7d for emacs-orgmode@gnu.org; Tue, 27 Jun 2023 08:00:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B73BC240101 for ; Tue, 27 Jun 2023 14:00:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1687867248; bh=Uh64jD+YlS1TK2s9z0I48S7+Apa38ffk4PGx+mYkQRI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=f5HVdtw4QIaYBZbyhAWZbBDK7aqDWkOZP1b0W2AQzs6OikhrSf6DUbVPknmoPx7lp 3MMWbxFheMstPPRGjCEW6ZAoPnJBlCOSr6su/ENO9uz+n+uISC4EwdwDcgFTyMTxwv WGmXXDkI4KzzgxdMQKlesuG+4lOnS96PdPv+Yu4wIjOlEeVqcb/bhyna+SFN9E+ySv dm/pUn3NxIU8vP8dXUy6rebqb0YvS09lV85tT3Qc2VTRJoqB1g/SaIvhT1MeShFRcL KYpm2Kr8U8ZttJx/bS6SeOtEIfSnf4Sk9ywwKv9g67a0o9ukeVmef89GDFzBnREaG6 2buDsyT0cMvwA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qr3FX0nKpz6tvZ; Tue, 27 Jun 2023 14:00:47 +0200 (CEST) From: Ihor Radchenko To: Ypo Cc: Org-mode Subject: Re: org-todo-state-tags-triggers not working with regexp? In-Reply-To: References: <3ce0b3d9-b423-60af-c7a3-904acdb64c46@gmail.com> <87y1kqns3l.fsf@localhost> Date: Tue, 27 Jun 2023 12:05:44 +0000 Message-ID: <87o7l1az53.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687867285; a=rsa-sha256; cv=none; b=CiEEmju6uEZxdgJZ2VLTq8AsqpFKOuZ/jurXy50rc+I9ioeI5KwT8TPdZGcqRR9IvP7Ypf yjs1nK9sM+WhC/rf0E4CElaeLhpiXkX8c89LDhHugOb24rLD/2a34/FDPEnkig+QXsH0b/ 78NBtLFIgW6P2WBcrTwxLoh+RM0ocZj0XX7yTvBNlhOoFM8bwetUQvjSvrZoWpM0ZH1ffN SddTD4G4vYkF7QQ7jKOKMZxLGt7U8qOoLIbgTlxTfoX5bpyiM6SOSJY3xBtLHTF7pzX52i wE28cztnOW7n0/IzCSV/oNOsxVv9Z/7zAEkTl4T51gS2iNw77a7G8U/bqAMOuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=f5HVdtw4; dmarc=pass (policy=none) header.from=posteo.net; 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=1687867285; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Ql3mYj4MNUHbPzDScTuVzKZblPIPNg2nuDsUTX3uDrs=; b=DrI1E7hM6/p7TEdX1EUxkjzqeRiEvCde5d/oI9Mc+01yNIdA7b/iHL8+UnwkJCoMjrG/bo yg9+8y3/XZA5Rarsp+nK7Ft59tGlhPbxsnw1bVQvw1fcK3Je01vga6+zo0FFyJeVfNpmLK JkfLEIQRkskiT7PxRO7AXU7FF1d5zfHDsTVGzIbey21z2jUyiKNVsyB47TEgPVrbCiL4/0 h0WMYfi9ffr9cy16mbV5977foTuQGAPafGBjoJXa0akWMKo04PSUNj43vaaOkt5uC2LGHT iIswtukHCGDqwPc5dfFLtkNmuTr98XKJsxEIrRhvzKWIEhEmd00NpfQU2pglGw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=f5HVdtw4; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -5.23 X-Spam-Score: -5.23 X-Migadu-Queue-Id: 21476E64C X-TUID: 6ZQhzWMGrD4I Ypo writes: > I have tried gptel inside emacs (I'm sorry, but I need to tell it) and I= =20 > got this code: > > #+begin_src emacs-lisp > (defun my-org-trigger-function (state) > =C2=A0 "Remove all tags when state changes to 'DONE'" > =C2=A0 (when (string=3D 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. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at