bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61176: post-command-hook is not run if minibuffer input is aborted


From: Stefan Monnier
Subject: bug#61176: post-command-hook is not run if minibuffer input is aborted
Date: Wed, 01 Feb 2023 18:06:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> - However, when the command reads from the minibuffer and the user
>   aborts that, then post-command-hook is NOT run a second time AFTER
>   the command.

Could you clarify what you mean here?
Let's say in the following scenario:

- The user hits a key like `M-x` which causes a minibuffer to be entered.
- the user hits C-g.
- Emacs exits the minibuffer and doesn't even call the command because
  the interactive args could not be gathered.

When do you expect `post-command-hook` to be run?

There's also the case where the command is called and it enters the
minibuffer (rather than doing it within the interactive spec).  Not sure
if it makes a significant difference.

Also it would help to know what you need `post-command-hook` for.

[ There are several "alternatives" to `post-command-hook` plus there
  are cases where code is executed not via a command, yet it can be
  viewed as a command execution as well (e.g. opening a file via
  `emacsclient`), so over the years ad-hoc calls to `post-command-hook`
  have been sprinkled outside of the "command-loop", which makes this
  whole business even more muddy.  ]


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]