emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Joris Caravati via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Add org-after-note-stored-hook
Date: Mon, 20 May 2024 21:46:24 +0200	[thread overview]
Message-ID: <m2le44gswd.fsf@kyon.home> (raw)
In-Reply-To: <87ikzbtl7m.fsf@localhost>


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!



  reply	other threads:[~2024-05-20 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 22:13 [PATCH] Add org-after-note-stored-hook Joris Caravati via General discussions about Org-mode.
2024-05-09  8:20 ` Joris Caravati via General discussions about Org-mode.
2024-05-09 11:38   ` Ihor Radchenko
2024-05-11 16:53 ` Ihor Radchenko
2024-05-12 20:12   ` Joris Caravati via General discussions about Org-mode.
2024-05-18 11:26     ` Ihor Radchenko
2024-05-20 19:46       ` Joris Caravati via General discussions about Org-mode. [this message]
2024-05-21 11:37         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2le44gswd.fsf@kyon.home \
    --to=emacs-orgmode@gnu.org \
    --cc=tyx+org@sula.io \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).