GNU bug report logs - #10018
24.0.91; C-x * Q not work if I switch input method (use C-\)...

Previous Next

Package: emacs;

Reported by: Oleksandr Gavenko <gavenko <at> bifit.com.ua>

Date: Fri, 11 Nov 2011 12:03:02 UTC

Severity: normal

Found in version 24.0.91

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10018 in the body.
You can then email your comments to 10018 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10018; Package emacs. (Fri, 11 Nov 2011 12:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleksandr Gavenko <gavenko <at> bifit.com.ua>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 11 Nov 2011 12:03:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleksandr Gavenko <gavenko <at> bifit.com.ua>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.91; C-x * Q not work if I switch input method (use C-\)...
Date: Fri, 11 Nov 2011 14:01:56 +0200
In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600)

I use russian-input method (by C-/).

When I switch to russian-input method I can not invoke quick calc by
C-x * Q (nothing happen) because as I think calc prompt for key and get
Russian 'Й'...

I think that any user expect with "C-x * Q" get calc instead nothing
regardless activated current input method ...
-- 
Best regards!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10018; Package emacs. (Tue, 15 Nov 2011 19:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 10018 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Oleksandr Gavenko <gavenko <at> bifit.com.ua>
Cc: 10018 <at> debbugs.gnu.org
Subject: Re: bug#10018: 24.0.91;
	C-x * Q not work if I switch input method (use C-\)...
Date: Tue, 15 Nov 2011 21:51:47 +0200
> When I switch to russian-input method I can not invoke quick calc by
> C-x * Q (nothing happen) because as I think calc prompt for key and get
> Russian 'Й'...
>
> I think that any user expect with "C-x * Q" get calc instead nothing
> regardless activated current input method ...

This is due to this code in `calc-read-key-sequence':

      (calc-unread-command (cdr key))
      (unwind-protect
	  (progn
	    (use-global-map map)
	    (use-local-map nil)
	    (read-key-sequence nil))
	(use-global-map glob)
	(use-local-map loc))

that intentionally rereads key sequences to translate `Q' to `Й'.
Without jumping through such hoops, it should work as you expect.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10018; Package emacs. (Fri, 18 Nov 2011 16:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 10018 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: 10018 <at> debbugs.gnu.org, Oleksandr Gavenko <gavenko <at> bifit.com.ua>
Subject: Re: bug#10018: 24.0.91;
	C-x * Q not work if I switch input method (use C-\)...
Date: Fri, 18 Nov 2011 11:07:06 -0500
>> When I switch to russian-input method I can not invoke quick calc by
>> C-x * Q (nothing happen) because as I think calc prompt for key and get
>> Russian 'Й'...
>> 
>> I think that any user expect with "C-x * Q" get calc instead nothing
>> regardless activated current input method ...

> This is due to this code in `calc-read-key-sequence':

>       (calc-unread-command (cdr key))
>       (unwind-protect
> 	  (progn
> 	    (use-global-map map)
> 	    (use-local-map nil)
> 	    (read-key-sequence nil))
> 	(use-global-map glob)
> 	(use-local-map loc))

> that intentionally rereads key sequences to translate `Q' to `Й'.

Is translating Q to Й really its intention, really?
I suspect the real intention is to obey function-key-map and friends.
So I think this code should temporarily disable input-method processing.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10018; Package emacs. (Sat, 19 Nov 2011 22:39:01 GMT) Full text and rfc822 format available.

Message #14 received at 10018 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10018 <at> debbugs.gnu.org, Oleksandr Gavenko <gavenko <at> bifit.com.ua>
Subject: Re: bug#10018: 24.0.91;
	C-x * Q not work if I switch input method (use C-\)...
Date: Sun, 20 Nov 2011 00:30:15 +0200
> I suspect the real intention is to obey function-key-map and friends.
> So I think this code should temporarily disable input-method processing.

I don't know whether this is the right fix, but it helps when
`input-method-function' is bound to nil in `calc-read-key-sequence':

=== modified file 'lisp/calc/calc.el'
--- lisp/calc/calc.el	2011-11-15 17:37:37 +0000
+++ lisp/calc/calc.el	2011-11-19 22:28:18 +0000
@@ -1235,7 +1235,8 @@ (defun calc-read-key-sequence (prompt ma
 	(glob (current-global-map))
 	(loc (current-local-map)))
     (or (input-pending-p) (message "%s" prompt))
-    (let ((key (calc-read-key t)))
+    (let ((key (calc-read-key t))
+	  (input-method-function nil))
       (calc-unread-command (cdr key))
       (unwind-protect
 	  (progn




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10018; Package emacs. (Sun, 20 Nov 2011 19:44:01 GMT) Full text and rfc822 format available.

Message #17 received at 10018 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: 10018 <at> debbugs.gnu.org, Oleksandr Gavenko <gavenko <at> bifit.com.ua>
Subject: Re: bug#10018: 24.0.91;
	C-x * Q not work if I switch input method (use C-\)...
Date: Sun, 20 Nov 2011 14:42:05 -0500
>> I suspect the real intention is to obey function-key-map and friends.
>> So I think this code should temporarily disable input-method processing.
> I don't know whether this is the right fix, but it helps when
> `input-method-function' is bound to nil in `calc-read-key-sequence':

> === modified file 'lisp/calc/calc.el'
> --- lisp/calc/calc.el	2011-11-15 17:37:37 +0000
> +++ lisp/calc/calc.el	2011-11-19 22:28:18 +0000
> @@ -1235,7 +1235,8 @@ (defun calc-read-key-sequence (prompt ma
>  	(glob (current-global-map))
>  	(loc (current-local-map)))
>      (or (input-pending-p) (message "%s" prompt))
> -    (let ((key (calc-read-key t)))
> +    (let ((key (calc-read-key t))
> +	  (input-method-function nil))
>        (calc-unread-command (cdr key))
>        (unwind-protect
>  	  (progn

That looks OK to me.


        Stefan




Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Tue, 22 Nov 2011 00:02:01 GMT) Full text and rfc822 format available.

Notification sent to Oleksandr Gavenko <gavenko <at> bifit.com.ua>:
bug acknowledged by developer. (Tue, 22 Nov 2011 00:02:02 GMT) Full text and rfc822 format available.

Message #22 received at 10018-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10018-done <at> debbugs.gnu.org, Oleksandr Gavenko <gavenko <at> bifit.com.ua>
Subject: Re: bug#10018: 24.0.91;
	C-x * Q not work if I switch input method (use C-\)...
Date: Tue, 22 Nov 2011 01:59:37 +0200
>> === modified file 'lisp/calc/calc.el'
>> --- lisp/calc/calc.el	2011-11-15 17:37:37 +0000
>> +++ lisp/calc/calc.el	2011-11-19 22:28:18 +0000
>> @@ -1235,7 +1235,8 @@ (defun calc-read-key-sequence (prompt ma
>>  	(glob (current-global-map))
>>  	(loc (current-local-map)))
>>      (or (input-pending-p) (message "%s" prompt))
>> -    (let ((key (calc-read-key t)))
>> +    (let ((key (calc-read-key t))
>> +	  (input-method-function nil))
>>        (calc-unread-command (cdr key))
>>        (unwind-protect
>>  	  (progn
>
> That looks OK to me.

With no objections from Jay, I installed this fix.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10018; Package emacs. (Tue, 22 Nov 2011 00:09:02 GMT) Full text and rfc822 format available.

Message #25 received at 10018 <at> debbugs.gnu.org (full text, mbox):

From: Jay Belanger <jay.p.belanger <at> gmail.com>
To: 10018 <at> debbugs.gnu.org
Cc: juri <at> jurta.org, jay.p.belanger <at> gmail.com
Subject: Re: bug#10018: 24.0.91;
	C-x * Q not work if I switch input method (use C-\)...
Date: Mon, 21 Nov 2011 18:07:02 -0600
Juri Linkov <juri <at> jurta.org> writes:
...
> With no objections from Jay, I installed this fix.

Great; thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Dec 2011 12:24:02 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.