all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 50042@debbugs.gnu.org, Simon Katz <sk@nomistech.com>
Subject: bug#50042: 26.3; Post-command hooks slow with M-x commands
Date: Sat, 14 Aug 2021 16:52:27 -0400	[thread overview]
Message-ID: <jwv35rb92kr.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87tujsq8ze.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 14 Aug 2021 18:36:21 +0200")

>> `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))))))))

Indeed this `sit-for` is a problem because it delays running the
`post-command-hook`.
[ We have a few other such problems, tho I sadly didn't bother to keep
  track of them.  ]

> 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.

Using a timer might be a good option, indeed.


        Stefan






  reply	other threads:[~2021-08-14 20:52 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
2021-08-14 20:52       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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=jwv35rb92kr.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=50042@debbugs.gnu.org \
    --cc=larsi@gnus.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.