unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* trunk read-key-sequence bug
@ 2008-01-17  7:05 Katsumi Yamaoka
  2008-01-17 12:28 ` Johan Bockgård
  2008-01-20  6:14 ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2008-01-17  7:05 UTC (permalink / raw)
  To: emacs-devel

Hi,

To reproduce this bug, eval this form:

(let ((buffer (get-buffer-create "*testing*"))
      (keymap1 (make-sparse-keymap))
      (keymap2 (make-sparse-keymap)))
  (define-key keymap1 "a" keymap2)
  (pop-to-buffer buffer)
  (use-local-map keymap1)
  (read-key-sequence "01234567890123456789012345678901234567"))

Press the `a' key.  And then, after the first `a' appears in the
echo area, press the backspace key.  You will see:

(args-out-of-range "a backspace" 0 38)

The same error happens when I type `C-h c S' and then backspace
in the Gnus summary buffer.

Regards,

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

* Re: trunk read-key-sequence bug
  2008-01-17  7:05 trunk read-key-sequence bug Katsumi Yamaoka
@ 2008-01-17 12:28 ` Johan Bockgård
  2008-01-20  6:14 ` Richard Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Johan Bockgård @ 2008-01-17 12:28 UTC (permalink / raw)
  To: emacs-devel

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> Hi,
>
> To reproduce this bug, eval this form:
>
> (let ((buffer (get-buffer-create "*testing*"))
>       (keymap1 (make-sparse-keymap))
>       (keymap2 (make-sparse-keymap)))
>   (define-key keymap1 "a" keymap2)
>   (pop-to-buffer buffer)
>   (use-local-map keymap1)
>   (read-key-sequence "01234567890123456789012345678901234567"))
>
> Press the `a' key.  And then, after the first `a' appears in the
> echo area, press the backspace key.  You will see:
>
> (args-out-of-range "a backspace" 0 38)
>
> The same error happens when I type `C-h c S' and then backspace
> in the Gnus summary buffer.

FWIW, this is the same bug as my report from November (which never got
any replies):

Message-ID: <yoijaboxuwrk.fsf@remote1.student.chalmers.se>
http://article.gmane.org/gmane.emacs.devel/84294

-- 
Johan Bockgård

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

* Re: trunk read-key-sequence bug
  2008-01-17  7:05 trunk read-key-sequence bug Katsumi Yamaoka
  2008-01-17 12:28 ` Johan Bockgård
@ 2008-01-20  6:14 ` Richard Stallman
  2008-01-21  0:42   ` Katsumi Yamaoka
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2008-01-20  6:14 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: emacs-devel

I think this fixes the bug.  Does it give good results in general?

*** keyboard.c	04 Jan 2008 00:28:05 -0500	1.936
--- keyboard.c	19 Jan 2008 14:13:04 -0500	
***************
*** 2715,2720 ****
--- 2715,2722 ----
    /* if redisplay was requested */
    if (commandflag >= 0)
      {
+       int echo_current = echo_message_buffer == echo_area_buffer[0];
+ 
  	/* If there is pending input, process any events which are not
  	   user-visible, such as X selection_request events.  */
        if (input_pending
***************
*** 2738,2743 ****
--- 2740,2749 ----
  	  swallow_events (0);
  	  /* If that cleared input_pending, try again to redisplay.  */
  	}
+ 
+       if (commandflag == 0 && echo_current)
+ 	echo_message_buffer = echo_area_buffer[0];
+ 
      }
  
    /* Message turns off echoing unless more keystrokes turn it on again.

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

* Re: trunk read-key-sequence bug
  2008-01-20  6:14 ` Richard Stallman
@ 2008-01-21  0:42   ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2008-01-21  0:42 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

>>>>> Richard Stallman wrote:
> I think this fixes the bug.  Does it give good results in general?

The patch made Emacs trunk and Unicode-2 work like Emacs 22.1
and the one in the EMACS_22_BASE branch, i.e., the prompt string
does not disappear while entering a key sequence.  I think this
is the right behavior.  Thanks.

> *** keyboard.c	04 Jan 2008 00:28:05 -0500	1.936
> --- keyboard.c	19 Jan 2008 14:13:04 -0500
> ***************
> *** 2715,2720 ****
> --- 2715,2722 ----
>     /* if redisplay was requested */
>     if (commandflag >= 0)
>       {
> +       int echo_current = echo_message_buffer == echo_area_buffer[0];
> +
>   	/* If there is pending input, process any events which are not
>   	   user-visible, such as X selection_request events.  */
>         if (input_pending
> ***************
> *** 2738,2743 ****
> --- 2740,2749 ----
>   	  swallow_events (0);
>   	  /* If that cleared input_pending, try again to redisplay.  */
>}
> +
> +       if (commandflag == 0 && echo_current)
> + 	echo_message_buffer = echo_area_buffer[0];
> +
>}

>     /* Message turns off echoing unless more keystrokes turn it on again.

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

end of thread, other threads:[~2008-01-21  0:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-17  7:05 trunk read-key-sequence bug Katsumi Yamaoka
2008-01-17 12:28 ` Johan Bockgård
2008-01-20  6:14 ` Richard Stallman
2008-01-21  0:42   ` Katsumi Yamaoka

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