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


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Bhavin Gandhi <bhavin7392 <at> gmail.com>
Cc: 56425 <at> debbugs.gnu.org
Subject: bug#56425: 28.1; post-command-hook is triggered on y-or-n-p
Date: Wed, 06 Jul 2022 21:19:00 +0300
> Is read-from-minibuffer triggering the post-command-hook?

This is the most interesting question.  When you replace the y-or-n-p call
in your code with read-from-minibuffer, do you see the same result?

If not, then maybe these lines y-or-n-p affect the behavior somehow,
but I'm sure:

  ;; Protect this-command when called from pre-command-hook (bug#45029)
  (this-command this-command)

If all fails, then as the last resort you always have an option to
fall back to the modal behavior of y-or-n-p by wrapping the call
with y-or-n-p-use-read-key:

  (let ((y-or-n-p-use-read-key t)) (y-or-n-p "Some question: "))




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.