From: Lars Ingebrigtsen <larsi@gnus.org>
To: Simon Katz <sk@nomistech.com>
Cc: 50042@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#50042: 26.3; Post-command hooks slow with M-x commands
Date: Sat, 14 Aug 2021 18:36:21 +0200 [thread overview]
Message-ID: <87tujsq8ze.fsf@gnus.org> (raw)
In-Reply-To: <87lf55edhd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 13 Aug 2021 14:27:42 +0200")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Simpler repro:
>
> (add-hook 'post-command-hook
> (lambda ()
> (let ((inhibit-message t))
> (message "foo: %s" this-command))))
> (display-buffer "*Messages*")
>
> M-x previous-line
[...]
> `execute-extended-command' ends with
>
> (when binding
> (with-temp-message
> (format-message "You can run the command `%s' with %s"
> function
> (if (stringp binding)
> (concat "M-x " binding " RET")
> (key-description binding)))
> (sit-for (if (numberp suggest-key-bindings)
> suggest-key-bindings
> 2))))))))
>
> So presumably `post-command-hook' isn't run after that timeout has
> completed.
[...]
> Could we yank this out of the flow and run it from a timer (fired
> immediately) instead?
Stefan, I forgot to put you on the CCs here -- I wondered whether you
had any ideas here. I think lifting this out of
`execute-extended-command' should be possible -- either by doing
something a la
(run-at-time 0 nil (lambda ()
(with-temp-message "The binding is foo"
(sit-for 1))))
or making `execute-extended-command' set a variable and do the messaging
from the "command loop" after running post-command-hook.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-08-14 16:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <878s13os3a.fsf@gnus.org>
2021-08-13 11:52 ` bug#50042: 26.3; Post-command hooks slow with M-x commands Simon Katz
2021-08-13 12:27 ` Lars Ingebrigtsen
2021-08-13 12:40 ` Simon Katz
2021-08-14 16:36 ` Lars Ingebrigtsen [this message]
2021-08-14 20:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-15 11:38 ` Lars Ingebrigtsen
2021-08-17 0:41 ` Dmitry Gutov
[not found] ` <handler.50042.C.162902754922550.notifdonectrl.0@debbugs.gnu.org>
2021-08-18 15:27 ` bug#50042: acknowledged by developer (control message for bug #50042) Simon Katz
2021-08-18 15:33 ` Simon Katz
2021-08-18 15:37 ` Simon Katz
2021-08-19 13:07 ` Lars Ingebrigtsen
2021-08-19 14:55 ` Simon Katz
2021-08-20 13:09 ` Lars Ingebrigtsen
2021-08-20 16:14 ` Simon Katz
2021-08-21 12:55 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tujsq8ze.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=50042@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=sk@nomistech.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.