GNU bug report logs -
#23002
[OSX] 25.0.92; sluggish M-x (`while-no-input' non-responsive)
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Sun, 13 Mar 2016 04:03:02 UTC
Severity: normal
Found in version 25.0.92
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>>> On Mon, 14 Mar 2016 12:21:54 +0800, Leo Liu <sdl.web <at> gmail.com> said:
> On 2016-03-13 18:08 +0200, Eli Zaretskii wrote:
>> I cannot reproduce this on my system. (You didn't say which system is
>> yours, nor which commit is was built from, so I cannot compare that.)
>> Here, the cursor exits the minibuffer immediately, and if I type
>> something, the hint message is never shown (as I'd expect).
>>
>> Sounds like sit-for is not working correctly on your system, but I
>> have no idea why that should happen.
> At the time of reporting I didn't have access to a NS build. I just did
> one and couldn't reproduce it either. I have emailed MacPort maintainer
> to take a look at this bug and will act accordingly. Thanks.
Not updating the display on the Mac port is because it avoids frequent
flushes and input reads for overall performance. Flushing is deferred
until the next input reading, and in the case that
execute-extended-command--shorter takes a long time, it will be at the
timing of the next polling (every 2 seconds by default).
However, the sluggishness during the evaluation of
execute-extended-command--shorter is common to the both ports on OS X,
or non-interrupt-driven systems that use polling with SIGALRM for
quit/while-no-input handling, in general. I'm thinkng about applying
the following patch to the Mac port, but it might also be useful for
other systems.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
diff --git a/lisp/simple.el b/lisp/simple.el
index 4954763..57b7ca6 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1642,6 +1642,7 @@ execute-extended-command--shorter
(let ((candidates '())
(max (length typed))
(len 1)
+ (use-polling (and (null (car (current-input-mode))) throw-on-input))
binding)
(while (and (not binding)
(progn
@@ -1652,6 +1653,11 @@ execute-extended-command--shorter
;; Don't show the help message if the binding isn't
;; significantly shorter than the M-x command the user typed.
(< len (- max 5))))
+ ;; On non-interrupt-driven systems, while-no-input polls for
+ ;; input every `polling-period' (default 2) seconds, and that is
+ ;; not frequent enough. So we call input-pending-p manually.
+ (if (and use-polling (input-pending-p))
+ (signal 'quit nil))
(let ((candidate (pop candidates)))
(when (equal name
(car-safe (completion-try-completion
This bug report was last modified 4 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.