unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u
@ 2009-07-26 23:30 ` Drew Adams
  2009-07-28 15:55   ` bug#3938: marked as done (23.0.96; regression: minibuffer-message interferes with C-u) Emacs bug Tracking System
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Drew Adams @ 2009-07-26 23:30 UTC (permalink / raw)
  To: emacs-pretest-bug

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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#3938: marked as done (23.0.96; regression: minibuffer-message interferes with C-u)
  2009-07-26 23:30 ` bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u Drew Adams
@ 2009-07-28 15:55   ` Emacs bug Tracking System
  2009-07-28 20:20   ` Emacs bug Tracking System
       [not found]   ` <handler.3938.D3938.12488120693237.notifdone@emacsbugs.donarmstrong.com>
  2 siblings, 0 replies; 7+ messages in thread
From: Emacs bug Tracking System @ 2009-07-28 15:55 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]


Your message dated Tue, 28 Jul 2009 11:46:30 -0400
with message-id <877hxsolnt.fsf@stupidchicken.com>
and subject line Re: 23.0.96; regression: minibuffer-message interferes with C-u
has caused the Emacs bug report #3938,
regarding 23.0.96; regression: minibuffer-message interferes with C-u
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3938: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3938
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4990 bytes --]

From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-pretest-bug@gnu.org>
Subject: 23.0.96; regression: minibuffer-message interferes with C-u
Date: Sun, 26 Jul 2009 16:30:44 -0700
Message-ID: <CAD1656FC51949788BDCE5A2D545E258@us.oracle.com>

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



[-- Attachment #3: Type: message/rfc822, Size: 2496 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 3938-done@emacsbugs.donarmstrong.com
Subject: Re: 23.0.96; regression: minibuffer-message interferes with C-u
Date: Tue, 28 Jul 2009 11:46:30 -0400
Message-ID: <877hxsolnt.fsf@stupidchicken.com>

> (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"))

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#3938: marked as done (23.0.96; regression: minibuffer-message interferes with C-u)
  2009-07-26 23:30 ` bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u Drew Adams
  2009-07-28 15:55   ` bug#3938: marked as done (23.0.96; regression: minibuffer-message interferes with C-u) Emacs bug Tracking System
@ 2009-07-28 20:20   ` Emacs bug Tracking System
       [not found]   ` <handler.3938.D3938.12488120693237.notifdone@emacsbugs.donarmstrong.com>
  2 siblings, 0 replies; 7+ messages in thread
From: Emacs bug Tracking System @ 2009-07-28 20:20 UTC (permalink / raw)
  To: Drew Adams

[-- Attachment #1: Type: text/plain, Size: 930 bytes --]


Your message dated Tue, 28 Jul 2009 13:14:19 -0700
with message-id <81FEC5A6961B47B5BDF82CA5C33EC637@us.oracle.com>
and subject line bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u
has caused the Emacs bug report #3938,
regarding 23.0.96; regression: minibuffer-message interferes with C-u
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3938: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3938
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4990 bytes --]

From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-pretest-bug@gnu.org>
Subject: 23.0.96; regression: minibuffer-message interferes with C-u
Date: Sun, 26 Jul 2009 16:30:44 -0700
Message-ID: <CAD1656FC51949788BDCE5A2D545E258@us.oracle.com>

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



[-- Attachment #3: Type: message/rfc822, Size: 6021 bytes --]

From: "Drew Adams" <drew.adams@oracle.com>
To: "'Chong Yidong'" <cyd@stupidchicken.com>
Cc: <3938-done@emacsbugs.donarmstrong.com>
Subject: bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u
Date: Tue, 28 Jul 2009 13:14:19 -0700
Message-ID: <81FEC5A6961B47B5BDF82CA5C33EC637@us.oracle.com>

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

Actually, I already had the call to `minibuffer-message' last, in my own code.

I pared down my original code again, and discovered that the problem of the
regression is elsewhere. (Note, BTW, that the definition of `sit-for' has not
changed in Emacs 23 wrt Emacs 22, and this bug is a regression from Emacs 22.)

emacs -Q

(define-key minibuffer-local-must-match-map "\C-f" 'test2)
(define-key minibuffer-local-must-match-map
  (vector 'remap 'universal-argument) 'test-univ-arg)

(defun test2 () (interactive) (describe-function '+))

(defun test-univ-arg ()
  (interactive)
  (setq prefix-arg                     (list 4)
        universal-argument-num-events  (length (this-command-keys)))
  (my-ensure-overriding-map-is-bound)
  (minibuffer-message "FOO"))

;; Same as `ensure-overriding-map-is-bound', but with
;; `my-universal-argument-map' instead of `universal-argument-map'.
(defun my-ensure-overriding-map-is-bound ()
  (unless overriding-map-is-bound
    (setq saved-overriding-map           overriding-terminal-local-map
          overriding-terminal-local-map  my-universal-argument-map
          overriding-map-is-bound        t)))

;; Exact copy of `universal-argument-map'.
(defvar my-universal-argument-map
  (let ((map  (make-sparse-keymap)))
    (define-key map [t] 'universal-argument-other-key)
    (define-key map (vector meta-prefix-char t) 'universal-argument-other-key)
    (define-key map [switch-frame] nil)
    (define-key map [?\C-u] 'universal-argument-more)
    (define-key map [?-] 'universal-argument-minus)
    (define-key map [?0] 'digit-argument)
    (define-key map [?1] 'digit-argument)
    (define-key map [?2] 'digit-argument)
    (define-key map [?3] 'digit-argument)
    (define-key map [?4] 'digit-argument)
    (define-key map [?5] 'digit-argument)
    (define-key map [?6] 'digit-argument)
    (define-key map [?7] 'digit-argument)
    (define-key map [?8] 'digit-argument)
    (define-key map [?9] 'digit-argument)
    (define-key map [kp-0] 'digit-argument)
    (define-key map [kp-1] 'digit-argument)
    (define-key map [kp-2] 'digit-argument)
    (define-key map [kp-3] 'digit-argument)
    (define-key map [kp-4] 'digit-argument)
    (define-key map [kp-5] 'digit-argument)
    (define-key map [kp-6] 'digit-argument)
    (define-key map [kp-7] 'digit-argument)
    (define-key map [kp-8] 'digit-argument)
    (define-key map [kp-9] 'digit-argument)
    (define-key map [kp-subtract] 'universal-argument-minus)
    map))

IOW, we use an exact copy of `universal-argument-map' instead of
`universal-argument-map' itself. That's the only change from vanilla Emacs (the
definition of `my-ensure-overriding-map-is-bound' just reflects the vanilla
definition).

Same instructions as before: M-x C-u C-f, hitting C-f right after C-u (no delay)
vs waiting until the 2-sec delay for `minibuffer-message' has elapsed.

Compare the same test using Emacs 22.

With Emacs 23, the delay must elapse entirely - the user input event of hitting
`C-f' does not seem to interrupt it (`sit-for' should be interrupted by an input
event). So the effect, in Emacs 23, is that you need to hit `C-f' twice (or wait
before hitting it). In Emacs 22, hitting `C-f' just once works immediately. In
Emacs 23, the first `C-f' just has the effect of clearing "FOO" from the
minibuffer.


[Also, if instead of using `my-universal-argument-map' you use (copy-keymap
universal-argument-map) the result is the same. Using
`my-universal-argument-map' is a better test, since `copy-keymap' doesn't copy
recursively.]


^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#3938: BUG system seems messed up - I did not close this bug
       [not found]   ` <handler.3938.D3938.12488120693237.notifdone@emacsbugs.donarmstrong.com>
@ 2009-07-28 20:47     ` Drew Adams
  2009-07-28 21:11       ` Sven Joachim
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2009-07-28 20:47 UTC (permalink / raw)
  To: 3938

There is a problem with the bug system, it seems. I sent a simple reply to
Yidong's message, which had the original bug subject:
bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u

However, somehow my reply got interpreted as CLOSING the bug. Yidong had closed
it. In fact, I had sent a control message to reopen it.

This bug system is a mess, it seems.

This bug should not be closed.

> -----Original Message-----
> From: Emacs bug Tracking System 
> [mailto:owner@emacsbugs.donarmstrong.com] 
> Sent: Tuesday, July 28, 2009 1:20 PM
> To: Drew Adams
> Subject: bug#3938 closed by "Drew Adams" 
> <drew.adams@oracle.com> (bug#3938: 23.0.96; regression: 
> minibuffer-message interferes with C-u)
> 
> 
> 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 "Drew Adams" <drew.adams@oracle.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 "Drew 
> Adams" <drew.adams@oracle.com> by
> replying to this email.
> 
> 
> -- 
> 3938: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3938
> Emacs Bug Tracking System
> Contact owner@emacsbugs.donarmstrong.com with problems
> 






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#3938: BUG system seems messed up - I did not close this bug
  2009-07-28 20:47     ` bug#3938: BUG system seems messed up - I did not close this bug Drew Adams
@ 2009-07-28 21:11       ` Sven Joachim
  2009-07-28 21:59         ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Joachim @ 2009-07-28 21:11 UTC (permalink / raw)
  To: Drew Adams; +Cc: 3938, Chong Yidong

On 2009-07-28 22:47 +0200, Drew Adams wrote:

> There is a problem with the bug system, it seems. I sent a simple reply to
> Yidong's message, which had the original bug subject:
> bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u
>
> However, somehow my reply got interpreted as CLOSING the bug. Yidong had closed
> it.

Yes, he had sent a message to 3938-done@e.d.b. _and_ to you.  If you
reply to that, you need to edit out the "-done" part to prevent
re-closing the bug if you reopened it.

Since this is somewhat confusing, maybe it would be better to only send
bug closing messages to the nnnn-done address and not to the submitter
as well?

Sven





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#3938: BUG system seems messed up - I did not close this bug
  2009-07-28 21:11       ` Sven Joachim
@ 2009-07-28 21:59         ` Drew Adams
  2009-07-29 15:43           ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2009-07-28 21:59 UTC (permalink / raw)
  To: 'Sven Joachim'; +Cc: 3938, 'Chong Yidong'

> Yes, he had sent a message to 3938-done@e.d.b. _and_ to you.  If you
> reply to that, you need to edit out the "-done" part to prevent
> re-closing the bug if you reopened it.
> 
> Since this is somewhat confusing, maybe it would be better to 
> only send bug closing messages to the nnnn-done address and
> not to the submitter as well?
> 
> Sven

I see; thanks.

However, the submitter needs to be informed of a bug closing. What shouldn't
happen, perhaps, is to include all of the addresses in the same mail. Or,
better, the bug tracking system should use only instructions in the mail body to
close a bug - it shouldn't just close a bug if the address *-done is a
recipient. Anyway, I'll leave solving the bug-tracker problems to others more
qualified. Obviously, it is fragile, overly complex, and needs some improvement.

I hope that this bug (#3938) is still open for now, in any case.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#3938: BUG system seems messed up - I did not close this bug
  2009-07-28 21:59         ` Drew Adams
@ 2009-07-29 15:43           ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2009-07-29 15:43 UTC (permalink / raw)
  To: Drew Adams; +Cc: 3938, 'Chong Yidong', 'Sven Joachim'

> However, the submitter needs to be informed of a bug closing. What shouldn't

She is informed automatically by the bug-tracker.


        Stefan





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-07-29 15:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <877hxsolnt.fsf@stupidchicken.com>
2009-07-26 23:30 ` bug#3938: 23.0.96; regression: minibuffer-message interferes with C-u Drew Adams
2009-07-28 15:55   ` bug#3938: marked as done (23.0.96; regression: minibuffer-message interferes with C-u) Emacs bug Tracking System
2009-07-28 20:20   ` Emacs bug Tracking System
     [not found]   ` <handler.3938.D3938.12488120693237.notifdone@emacsbugs.donarmstrong.com>
2009-07-28 20:47     ` bug#3938: BUG system seems messed up - I did not close this bug Drew Adams
2009-07-28 21:11       ` Sven Joachim
2009-07-28 21:59         ` Drew Adams
2009-07-29 15:43           ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).