[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add org-after-note-stored-hook
From: |
Joris Caravati |
Subject: |
Re: [PATCH] Add org-after-note-stored-hook |
Date: |
Mon, 20 May 2024 21:46:24 +0200 |
User-agent: |
mu4e 1.10.8; emacs 29.3 |
Ihor Radchenko <yantar92@posteo.net> 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!