unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19875: 25.0.50; Setting an input-method-function breaks prefix show on the echo area
@ 2015-02-15 17:04 Óscar Fuentes
  2015-02-15 17:30 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Óscar Fuentes @ 2015-02-15 17:04 UTC (permalink / raw)
  To: 19875


emacs -Q
M-x set-input-method ENTER spanish-prefix ENTER

Now let's suppose that we want to execute a command with a numeric
prefix (say 42). Let's press C-u and wait until it is displayed on the
echo area, then press `4' and wait, then press `2' and wait until it
is displayed too. The echo area shows:

C-u C-u 4 C-u 4 2

The problem is not limited to `set-input-method'. I discovered it with
key-chord-mode. I also have echo-keystrokes set to a low value, which
makes the problem more jarring.



In GNU Emacs 25.0.50.5 (x86_64-unknown-linux-gnu, X toolkit)
 of 2015-01-03 on qcore
Repository revision: 11ee7d8bf16b8ee4fcb3659e4b09686ed8b10590
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description:	Ubuntu 14.10

Configured using:
 `configure --without-toolkit-scroll-bars --with-x-toolkit=lucid'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY LIBXML2 FREETYPE XFT
ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix





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

* bug#19875: 25.0.50; Setting an input-method-function breaks prefix show on the echo area
  2015-02-15 17:04 bug#19875: 25.0.50; Setting an input-method-function breaks prefix show on the echo area Óscar Fuentes
@ 2015-02-15 17:30 ` Eli Zaretskii
  2015-02-15 18:03   ` Óscar Fuentes
  2015-02-18  4:16   ` Óscar Fuentes
  0 siblings, 2 replies; 4+ messages in thread
From: Eli Zaretskii @ 2015-02-15 17:30 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: 19875

> From: oscarfv@telefonica.net (Óscar Fuentes)
> Date: Sun, 15 Feb 2015 18:04:16 +0100
> 
> 
> emacs -Q
> M-x set-input-method ENTER spanish-prefix ENTER
> 
> Now let's suppose that we want to execute a command with a numeric
> prefix (say 42). Let's press C-u and wait until it is displayed on the
> echo area, then press `4' and wait, then press `2' and wait until it
> is displayed too. The echo area shows:
> 
> C-u C-u 4 C-u 4 2

This happens on the release branch, and in Emacs 24.4 as well.





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

* bug#19875: 25.0.50; Setting an input-method-function breaks prefix show on the echo area
  2015-02-15 17:30 ` Eli Zaretskii
@ 2015-02-15 18:03   ` Óscar Fuentes
  2015-02-18  4:16   ` Óscar Fuentes
  1 sibling, 0 replies; 4+ messages in thread
From: Óscar Fuentes @ 2015-02-15 18:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 19875

Eli Zaretskii <eliz@gnu.org> writes:

> This happens on the release branch, and in Emacs 24.4 as well.

The relevant area of code in keyboard.c is very old. The bug probably
has more than 15 years.

Semi-blind fix attempt:

diff --git a/src/keyboard.c b/src/keyboard.c
index bcb51cf..8b65f0e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3095,7 +3095,15 @@ read_char (int commandflag, Lisp_Object map,
 
       cancel_echoing ();
       ok_to_echo_at_next_pause = saved_ok_to_echo;
-      kset_echo_string (current_kboard, saved_echo_string);
+      /* Do not restore the echo area string if the user is
+         introducing a prefix argument. Otherwise we end with
+         repetitions of the partially introduced prefix
+         argument. (bug#19875) */
+      Lisp_Object pa = intern ("prefix-arg");
+      if (NILP(pa))
+        {
+          kset_echo_string (current_kboard, saved_echo_string);
+        }
       current_kboard->echo_after_prompt = saved_echo_after_prompt;
       if (saved_immediate_echo)
 	echo_now ();





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

* bug#19875: 25.0.50; Setting an input-method-function breaks prefix show on the echo area
  2015-02-15 17:30 ` Eli Zaretskii
  2015-02-15 18:03   ` Óscar Fuentes
@ 2015-02-18  4:16   ` Óscar Fuentes
  1 sibling, 0 replies; 4+ messages in thread
From: Óscar Fuentes @ 2015-02-18  4:16 UTC (permalink / raw)
  To: 19875-done

Fixed on 81d89d88aef5de720e7fbeecbfb295d6eaf6fd37





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

end of thread, other threads:[~2015-02-18  4:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-15 17:04 bug#19875: 25.0.50; Setting an input-method-function breaks prefix show on the echo area Óscar Fuentes
2015-02-15 17:30 ` Eli Zaretskii
2015-02-15 18:03   ` Óscar Fuentes
2015-02-18  4:16   ` Óscar Fuentes

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