Re: [PATCH] Add org-after-note-stored-hook

2024-05-21 Thread Ihor Radchenko
Joris Caravati writes: > Ihor Radchenko writes: > >> 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

Re: [PATCH] Add org-after-note-stored-hook

2024-05-20 Thread General discussions about Org-mode.
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

Re: [PATCH] Add org-after-note-stored-hook

2024-05-18 Thread Ihor Radchenko
Joris Caravati writes: >> An easier way would be forcing note earlier by calling >> `org-add-log-note' from your hook. > > I remember trying that before adding the hook (and I tried again today) > but the problem with adding the note directly is that I only seem to > manage storing the note

Re: [PATCH] Add org-after-note-stored-hook

2024-05-12 Thread General discussions about Org-mode.
Ihor Radchenko writes: > Although, removing heading from inside > `org-after-todo-state-change-hook' is a bad idea - Org mode does not > expect the heading to disappear from under the cursor when this hook is > executed. I recommend using `org-trigger-hook' instead. Thanks for your help! I

Re: [PATCH] Add org-after-note-stored-hook

2024-05-11 Thread Ihor Radchenko
Joris Caravati via "General discussions about Org-mode." writes: > I've been archiving tasks automatically using > `org-after-todo-state-change-hook' but I've been recently bit with a > note (entering a todo state configured with '@') being placed where the > task was before its archival. > >

Re: [PATCH] Add org-after-note-stored-hook

2024-05-09 Thread Ihor Radchenko
Joris Caravati via "General discussions about Org-mode." writes: > Is there anything wrong with the patch or with the proposition of > adding a hook there? The first I'd like to know for doing better next > time (or maybe correcting this one), the second to know if  I should > stop using it. It

Re: [PATCH] Add org-after-note-stored-hook

2024-05-09 Thread General discussions about Org-mode.
Hello, Is there anything wrong with the patch or with the proposition of adding a hook there? The first I'd like to know for doing better next time (or maybe correcting this one), the second to know if  I should stop using it. Thanks! Joris Joris Caravati writes: > Hello, > > I've been

[PATCH] Add org-after-note-stored-hook

2024-01-02 Thread General discussions about Org-mode.
Hello, I've been archiving tasks automatically using `org-after-todo-state-change-hook' but I've been recently bit with a note (entering a todo state configured with '@') being placed where the task was before its archival. This patch aims to offer a way to defer the archival after the note is