From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id IFc7KvCqS2ZKbQEAe85BDQ:P1 (envelope-from ) for ; Mon, 20 May 2024 21:56:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id IFc7KvCqS2ZKbQEAe85BDQ (envelope-from ) for ; Mon, 20 May 2024 21:56:32 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716234992; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to: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; bh=dYJFFvRX3fm92G1AdDAi/Kp1xj16NfXVVHBvdlQDmrA=; b=Mwycv7Z1elngXDl8tCqDpaxwJhsg+s0l3RCQBfo9EivErxI51qKcvEUc8JKcFeag5kD+Eh sdng1dXeYBGbvsFwymZlkVhxzgUYXpAkQdo3g/VteIOMrs1jV337+r19DFmBtFEMU4Bnso AddjkLpN/brd4Pckj9FjYeNVpdbSq9WavpxOle13gOKD9yY/kRqERP0r7OtuoDSarRodML V/AF1JUrTjOYr99Od23KlJ6Pi1Cw88BlOeSHpbpsbwHKugvibcSDD/GomEUcMmdeO8fDG3 LM9tr2cNyTBeYtHohJ/Wbln5R3n+2Ei3oFhXWjmnMSTVcHSEEwdpSelBnifkVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716234992; a=rsa-sha256; cv=none; b=XoqZCBQn/voujwPyI/HRbDumBIIKZS3bMdzO6J5pC5eNv/Vai6gsLyY4T+vpGiVX8ZSgDt b1opgsihGoCu3GxQPdz2d+WbFw6B7x//hzuOoQfpTzsgKLiVsHWicEZR0ta6Hmw0XxP4Jo 7IlFDSjnN3jXDjSdowBWvie82p7IjltAYuwVfa0NFQGAyrVZtZWJSQknk+QniWnOpu08SI 4mwvkkOWvCrpPdEA0agQSCbxZ+DncvHDTHhEQIru9LoHySeOqWXOQGYUK6B2nwi6YoQcWM eKZfiOTwDpOw9uk/HH3q1ktQqnHtFELnxxQ1HyAYehKo3PW+/CXTHfGs8M1IFQ== 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 5D9DD6362D for ; Mon, 20 May 2024 21:56:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s996i-0001uk-2G; Mon, 20 May 2024 15:55:40 -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 1s996g-0001ua-Ug for emacs-orgmode@gnu.org; Mon, 20 May 2024 15:55:38 -0400 Received: from 62-210-209-184.rev.poneytelecom.eu ([62.210.209.184] helo=sula.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s996f-00026A-BX for emacs-orgmode@gnu.org; Mon, 20 May 2024 15:55:38 -0400 Received: from localhost (anancy-653-1-9-249.w92-138.abo.wanadoo.fr [92.138.227.249]) by sula.io (Postfix) with ESMTPSA id D0C325D41BEA; Mon, 20 May 2024 21:55:31 +0200 (CEST) References: <8734qouw77.fsf@localhost> <87ikzbtl7m.fsf@localhost> User-agent: mu4e 1.10.8; emacs 29.3 To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Add org-after-note-stored-hook Date: Mon, 20 May 2024 21:46:24 +0200 In-reply-to: <87ikzbtl7m.fsf@localhost> Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=62.210.209.184; envelope-from=tyx+org@sula.io; helo=sula.io X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Joris Caravati From: Joris Caravati via "General discussions about Org-mode." Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.89 X-Spam-Score: -4.89 X-Migadu-Queue-Id: 5D9DD6362D X-Migadu-Scanner: mx13.migadu.com X-TUID: EdJd6ouVR65d Ihor Radchenko writes: > Right. Yet, using a hook is still not ideal - what if you configure todo > keywords to not store note at all in future? Then, the hook will never > be executed or will be executed at the time you don't expect. > > Note-taking mechanisms is generally tricky - it is schedule-based, > with note being taken after the current command is executed. > > I think I know how to make it possible for the note to be taken at the > right place after subtree archival. May you try the attached patch? Indeed, after testing it quickly it does what I want and notes are not a special case in `org-trigger-hook' anymore which is perfect. Thank you! > I added necessary keywords to the defcustom, changed the docstring to > state explicitly that the point is at the note taken when running a > hook, and changed the NEWS entry to (1) not have a link - we usually do > not do it; (2) moved it under appropriate heading. > I also removed your example from the commit message as it is not the > best illustration (see my considerations above). > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f3e306c73 > > You are now listed among Org mode contributors. > https://git.sr.ht/~bzg/worg/commit/3093b569 Thanks for your help!