unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 46243@debbugs.gnu.org
Subject: bug#46243: [External] : Re: bug#46243: 26.3; If invoke menu item that reads a char, get keystrokes echo
Date: Wed, 03 Feb 2021 11:16:58 -0500	[thread overview]
Message-ID: <jwvbld1i0z2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83pn1h401u.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 03 Feb 2021 17:56:45 +0200")

> This is a consequence of fixing bug#15332.  CC'ing Stefan, who both
> reported the bug and installed the fix.
> Stefan, the change you made to fix that bug, viz.:
>
> diff --git a/src/keyboard.c b/src/keyboard.c
> index 440820c..020c885 100644
> --- a/src/keyboard.c
> +++ b/src/keyboard.c
> @@ -2596,10 +2596,8 @@ read_char (int commandflag, Lisp_Object map,
>  
>    if (/* There currently is something in the echo area.  */
>        !NILP (echo_area_buffer[0])
> -      && (/* And it's either not from echoing.  */
> -	  !EQ (echo_area_buffer[0], echo_message_buffer)
> -	  /* Or it's an echo from a different kboard.  */
> -	  || echo_kboard != current_kboard
> +      && (/* It's an echo from a different kboard.  */
> +	  echo_kboard != current_kboard
>  	  /* Or we explicitly allow overwriting whatever there is.  */
>  	  || ok_to_echo_at_next_pause == NULL))
>      cancel_echoing ();
>    else
>      echo_dash ();
>
> is what's causing this one: where we previously called cancel_echoing,
> because !EQ (echo_area_buffer[0], echo_message_buffer) was true, we
> now call echo_dash, because the remaining 2 conditions are false.
>
> The change you installed is not explained, so I cannot reason about
> the importance of echo_message_buffer.  Do you remember why you
> decided to remove that 3rd condition?

I don't think I understood the echo-keystrokes code very back then and
I still don't understand it very much either.

This fixed the problem, but I'm not sure why.  I just tried to revert
this change and it does re-introduce part of the problem mentioned in
bug#15332:

    C-u [..wait..] 5

gives me immediately `C-u 5-` in the echo area whereas

    C-u [..wait..] 5 5

only shows `C-u 55-` after the `echo-keystrokes` delay.


        Stefan






  reply	other threads:[~2021-02-03 16:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 18:50 bug#46243: 26.3; If invoke menu item that reads a char, get keystrokes echo Drew Adams
2021-02-01 19:06 ` Drew Adams
2021-02-01 19:33 ` Eli Zaretskii
2021-02-01 22:30   ` bug#46243: [External] : " Drew Adams
2021-02-02 17:04     ` Eli Zaretskii
2021-02-03 15:56       ` Eli Zaretskii
2021-02-03 16:16         ` Stefan Monnier [this message]
2021-02-03 17:15           ` Eli Zaretskii
2021-02-03 17:42             ` Stefan Monnier
2021-02-03 19:56               ` Stefan Monnier
2021-02-04 15:50               ` Eli Zaretskii
2021-02-04 16:50                 ` Stefan Monnier
2021-02-04 17:37                   ` Eli Zaretskii
2021-02-04 19:23                     ` Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvbld1i0z2.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=46243@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 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).