* bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\)...
@ 2011-11-11 12:01 Oleksandr Gavenko
2011-11-15 19:51 ` Juri Linkov
0 siblings, 1 reply; 7+ messages in thread
From: Oleksandr Gavenko @ 2011-11-11 12:01 UTC (permalink / raw)
To: 10018
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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\)...
2011-11-11 12:01 bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\) Oleksandr Gavenko
@ 2011-11-15 19:51 ` Juri Linkov
2011-11-18 16:07 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2011-11-15 19:51 UTC (permalink / raw)
To: Oleksandr Gavenko; +Cc: 10018
> 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\)...
2011-11-15 19:51 ` Juri Linkov
@ 2011-11-18 16:07 ` Stefan Monnier
2011-11-19 22:30 ` Juri Linkov
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2011-11-18 16:07 UTC (permalink / raw)
To: Juri Linkov; +Cc: 10018, Oleksandr Gavenko
>> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\)...
2011-11-18 16:07 ` Stefan Monnier
@ 2011-11-19 22:30 ` Juri Linkov
2011-11-20 19:42 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2011-11-19 22:30 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 10018, Oleksandr Gavenko
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\)...
2011-11-19 22:30 ` Juri Linkov
@ 2011-11-20 19:42 ` Stefan Monnier
2011-11-21 23:59 ` Juri Linkov
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2011-11-20 19:42 UTC (permalink / raw)
To: Juri Linkov; +Cc: 10018, Oleksandr Gavenko
>> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\)...
2011-11-20 19:42 ` Stefan Monnier
@ 2011-11-21 23:59 ` Juri Linkov
2011-11-22 0:07 ` Jay Belanger
0 siblings, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2011-11-21 23:59 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 10018-done, Oleksandr Gavenko
>> === 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\)...
2011-11-21 23:59 ` Juri Linkov
@ 2011-11-22 0:07 ` Jay Belanger
0 siblings, 0 replies; 7+ messages in thread
From: Jay Belanger @ 2011-11-22 0:07 UTC (permalink / raw)
To: 10018
Juri Linkov <juri@jurta.org> writes:
...
> With no objections from Jay, I installed this fix.
Great; thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-22 0:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11 12:01 bug#10018: 24.0.91; C-x * Q not work if I switch input method (use C-\) Oleksandr Gavenko
2011-11-15 19:51 ` Juri Linkov
2011-11-18 16:07 ` Stefan Monnier
2011-11-19 22:30 ` Juri Linkov
2011-11-20 19:42 ` Stefan Monnier
2011-11-21 23:59 ` Juri Linkov
2011-11-22 0:07 ` Jay Belanger
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).