GNU bug report logs -
#3938
23.0.96; regression: minibuffer-message interferes with C-u
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sun, 26 Jul 2009 23:35:05 UTC
Severity: normal
Tags: fixed
Merged with 5923
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:
#3938: 23.0.96; regression: minibuffer-message interferes with C-u
It has been closed by Chong Yidong <cyd <at> stupidchicken.com>.
Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <cyd <at> stupidchicken.com> by
replying to this email.
--
3938: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3938
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> (defun test-univ-arg ()
> (interactive)
> (setq prefix-arg (list 4)
> universal-argument-num-events (length (this-command-keys)))
> (minibuffer-message "FOO") ; NO GOOD. OK ONLY IF THIS IS REMOVED
> (ensure-overriding-map-is-bound))
>
> (defun test2 () (interactive) (describe-function '+))
>
> (define-key minibuffer-local-completion-map "\C-f" 'test2)
> (define-key minibuffer-local-completion-map
> (vector 'remap 'universal-argument) 'test-univ-arg)
>
> 1. Now do this, without waiting for the 2-sec delay after C-u.
> That is, hit C-f immediately after C-u.
>
> M-x C-u C-f
The function `sit-for', which `minibuffer-message' uses, treats C-u
specially. It's easy to get your code to work; just put the call to
`minibuffer-message' after `ensure-overriding-map-is-bound':
(defun test-univ-arg ()
(interactive)
(setq prefix-arg (list 4)
universal-argument-num-events (length (this-command-keys)))
(ensure-overriding-map-is-bound)
(minibuffer-message "FOO"))
[Message part 3 (message/rfc822, inline)]
emacs -Q
Eval these:
(defun test-univ-arg ()
(interactive)
(setq prefix-arg (list 4)
universal-argument-num-events (length (this-command-keys)))
(minibuffer-message "FOO") ; NO GOOD. OK ONLY IF THIS IS REMOVED
(ensure-overriding-map-is-bound))
(defun test2 () (interactive) (describe-function '+))
(define-key minibuffer-local-completion-map "\C-f" 'test2)
(define-key minibuffer-local-completion-map
(vector 'remap 'universal-argument) 'test-univ-arg)
Note that the definition of `test-univ-arg' is identical to the
definition of `universal-argument', except for the addition of the
call to `minibuffer-message'.
1. Now do this, without waiting for the 2-sec delay after C-u.
That is, hit C-f immediately after C-u.
M-x C-u C-f
2. Now do `M-x C-u C-f' again, this time waiting for the delay,
so the minibuffer message `FOO' is no longer displayed, before
hitting `C-f'.
#2 has the correct behavior: the input event `C-f' interrupts the
minibuffer message and immediately executes the `C-f' command (the
particular command used is immaterial; I use `describe-function'
just to easily see whether it is executed).
In Emacs 23, #1 has this incorrect effect: After C-u, the minibuffer
message FOO is erased, but the `C-f' is not picked up. You must
repeat `C-f' a second time, to get it to be picked up.
Note that if you hit C-f twice even very quickly, then the second
`C-f' is picked up (but not the first). IOW, the problem doesn't
seem to be that the delay has not passed. It seems to be that
only the first input event is ignored if the delay has not
expired. It's hard to hit C-f twice quickly, so I'm not certain
about this, but it seems to be the case.
In Emacs prior to Emacs 23, #1 also had the correct behavior of #2.
IOW, this is a regression.
In GNU Emacs 23.0.96.1 (i386-mingw-nt5.1.2600)
of 2009-07-09 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
This bug report was last modified 8 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.