GNU bug report logs - #56425
28.1; post-command-hook is triggered on y-or-n-p

Previous Next

Package: emacs;

Reported by: Bhavin Gandhi <bhavin7392 <at> gmail.com>

Date: Wed, 6 Jul 2022 17:57:02 UTC

Severity: normal

Tags: notabug

Found in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 56425 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Bhavin Gandhi <bhavin7392 <at> gmail.com>
Cc: 56425 <at> debbugs.gnu.org
Subject: Re: bug#56425: 28.1; post-command-hook is triggered on y-or-n-p
Date: Wed, 06 Jul 2022 22:03:45 +0300
> From: Bhavin Gandhi <bhavin7392 <at> gmail.com>
> Date: Wed, 6 Jul 2022 23:25:34 +0530
> 
> Also, my-test-command has not finished executing yet, it is waiting for
> user input, so how does it trigger the post-command-hook?  I'm not able
> to understand what causes it to trigger the post-command-hook, is it an
> expected behavior?

Yes.

> I'm I missing something here? Is read-from-minibuffer
> triggering the post-command-hook?

Yes.

Why are you surprised?  y-or-n-p invokes read-from-minibuffer, which
invokes recursive-edit, which starts a recursive command loop.  And
the command loop calls post-command-hook on each iteration.




This bug report was last modified 2 years and 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.