unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [23.1.50] C-y not processed immediately on a terminal
@ 2009-12-12  8:09 Yoshiaki Kasahara
  2009-12-12  8:39 ` Yoshiaki Kasahara
  2009-12-14  1:21 ` Kenichi Handa
  0 siblings, 2 replies; 14+ messages in thread
From: Yoshiaki Kasahara @ 2009-12-12  8:09 UTC (permalink / raw)
  To: emacs-devel

For several months I felt annoying that Emacs on a terminal (emacs
-nw) ignored "C-y" until next key input. Even C-q C-y is not processed
immediately ("^Y" doesn't show up on the screen) until I type another
key. I tried from C-a to C-z, and only C-y was affected. It occured
with emacs -Q -nw.

Today I learned how to use "git bisect", did bisecting, and found the
bad commit.

---

85256fb17e53d9505072ad171c92b648b6934434 is the first bad commit
commit 85256fb17e53d9505072ad171c92b648b6934434
Author: Kenichi Handa <handa@m17n.org>
Date:   Wed Jul 1 11:37:19 2009 +0000

    (decode_keyboard_code): New function.
    (tty_read_avail_input): Decode the input bytes if necessary.

---
	
Before this commit, C-y worked just fine. Handa-san, could you please
review the code and fix the problem? I'm sorry I don't understand the
code at all, so I can't fix it by myself...

I'm running Emacs 23.1.50 on FreeBSD 8.0R (x86_64).

Regards,
-- 
Yoshiaki Kasahara
Research Institute for Information Technology, Kyushu University
kasahara@nc.kyushu-u.ac.jp




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-12  8:09 [23.1.50] C-y not processed immediately on a terminal Yoshiaki Kasahara
@ 2009-12-12  8:39 ` Yoshiaki Kasahara
  2009-12-12  9:36   ` Miles Bader
  2009-12-14  1:21 ` Kenichi Handa
  1 sibling, 1 reply; 14+ messages in thread
From: Yoshiaki Kasahara @ 2009-12-12  8:39 UTC (permalink / raw)
  To: emacs-devel

On Sat, 12 Dec 2009 17:09:21 +0900 (JST),
	Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> said:

> For several months I felt annoying that Emacs on a terminal (emacs
> -nw) ignored "C-y" until next key input. Even C-q C-y is not processed
> immediately ("^Y" doesn't show up on the screen) until I type another
> key. I tried from C-a to C-z, and only C-y was affected. It occured
> with emacs -Q -nw.

Also I noticed that when I typed "C-y 1", halfwidth ア was inserted
into the buffer. So I guess C-y is treated as a prefix of halfwidth
katakana.

Regards,
-- 
Yoshiaki Kasahara
Research Institute for Information Technology, Kyushu University
kasahara@nc.kyushu-u.ac.jp




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-12  8:39 ` Yoshiaki Kasahara
@ 2009-12-12  9:36   ` Miles Bader
  2009-12-12  9:54     ` Eli Zaretskii
  2009-12-12 13:47     ` Yoshiaki Kasahara
  0 siblings, 2 replies; 14+ messages in thread
From: Miles Bader @ 2009-12-12  9:36 UTC (permalink / raw)
  To: Yoshiaki Kasahara; +Cc: emacs-devel

Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> writes:
>> For several months I felt annoying that Emacs on a terminal (emacs
>> -nw) ignored "C-y" until next key input. Even C-q C-y is not processed
>> immediately ("^Y" doesn't show up on the screen) until I type another
>> key. I tried from C-a to C-z, and only C-y was affected. It occured
>> with emacs -Q -nw.
>
> Also I noticed that when I typed "C-y 1", halfwidth ア was inserted
> into the buffer. So I guess C-y is treated as a prefix of halfwidth
> katakana.

What's LANG (etc) set to?

If I do:

    LANG=ja_JP.euc-jp emacs -Q -nw

then I see your problem.

But if I do:

   LANG=ja_JP.utf8 emacs -Q -nw

(or, LANG=C, or LANG=ja_JP.shift_jis, etc)

There's no problem.

So I'd guess your keyboard-coding-system is set to something which
interprets C-y (you can turn it off using "C-x m k").

-Miles

-- 
Suburbia: where they tear out the trees and then name streets after them.




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-12  9:36   ` Miles Bader
@ 2009-12-12  9:54     ` Eli Zaretskii
  2009-12-12 10:07       ` Miles Bader
  2009-12-12 13:47     ` Yoshiaki Kasahara
  1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2009-12-12  9:54 UTC (permalink / raw)
  To: Miles Bader; +Cc: kasahara, emacs-devel

> From: Miles Bader <miles@gnu.org>
> Date: Sat, 12 Dec 2009 18:36:17 +0900
> Cc: emacs-devel@gnu.org
> 
> So I'd guess your keyboard-coding-system is set to something which
> interprets C-y (you can turn it off using "C-x m k").
                                             ^^^^^^^
I assume you meant "C-x C-m k".




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-12  9:54     ` Eli Zaretskii
@ 2009-12-12 10:07       ` Miles Bader
  0 siblings, 0 replies; 14+ messages in thread
From: Miles Bader @ 2009-12-12 10:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kasahara, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:
>> So I'd guess your keyboard-coding-system is set to something which
>> interprets C-y (you can turn it off using "C-x m k").
>                                              ^^^^^^^
> I assume you meant "C-x C-m k".

Ah, yup.

Thanks,

-Miles

-- 
Year, n. A period of three hundred and sixty-five disappointments.




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-12  9:36   ` Miles Bader
  2009-12-12  9:54     ` Eli Zaretskii
@ 2009-12-12 13:47     ` Yoshiaki Kasahara
  2009-12-13 16:22       ` Richard Stallman
  1 sibling, 1 reply; 14+ messages in thread
From: Yoshiaki Kasahara @ 2009-12-12 13:47 UTC (permalink / raw)
  To: miles; +Cc: emacs-devel

On Sat, 12 Dec 2009 18:36:17 +0900,
	Miles Bader <miles@gnu.org> said:

> What's LANG (etc) set to?

ja_JP.eucJP 

> If I do:
> 
>     LANG=ja_JP.euc-jp emacs -Q -nw
> 
> then I see your problem.
> 
> But if I do:
> 
>    LANG=ja_JP.utf8 emacs -Q -nw
> 
> (or, LANG=C, or LANG=ja_JP.shift_jis, etc)
> 
> There's no problem.
> 
> So I'd guess your keyboard-coding-system is set to something which
> interprets C-y (you can turn it off using "C-x m k").

Oh, thank you very much to enlighten me.  I'm using Emacs on EUC-JP
environment on Unix for almost 20 years and never had such a problem,
so I didn't imagine it causes such a thing...

Nowadays more and more applications (especially X apps such as Gnome)
expect ja_JP.UTF-8, so I should migrate to UTF-8 environment soon.

Regards,
-- 
Yoshiaki Kasahara
Research Institute for Information Technology, Kyushu University
kasahara@nc.kyushu-u.ac.jp




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-12 13:47     ` Yoshiaki Kasahara
@ 2009-12-13 16:22       ` Richard Stallman
  2009-12-13 17:10         ` Miles Bader
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Stallman @ 2009-12-13 16:22 UTC (permalink / raw)
  To: Yoshiaki Kasahara; +Cc: emacs-devel, miles

It seems like a very bad idea for an input method to make C-y a prefix
character.




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-13 16:22       ` Richard Stallman
@ 2009-12-13 17:10         ` Miles Bader
  2009-12-15 13:12           ` Richard Stallman
  0 siblings, 1 reply; 14+ messages in thread
From: Miles Bader @ 2009-12-13 17:10 UTC (permalink / raw)
  To: rms; +Cc: Yoshiaki Kasahara, emacs-devel

Richard Stallman <rms@gnu.org> writes:
> It seems like a very bad idea for an input method to make C-y a prefix
> character.

It's not an input method, it's a keyboard encoding (in this case
EUC-JP), and that's determined by an outsider party/standard/...

I'm not sure what Emacs can do other than recommend the user either
avoid using encoded keyboard input, or change their system to use a
different encoding for that.

-Miles

-- 
Hers, pron. His.




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-12  8:09 [23.1.50] C-y not processed immediately on a terminal Yoshiaki Kasahara
  2009-12-12  8:39 ` Yoshiaki Kasahara
@ 2009-12-14  1:21 ` Kenichi Handa
  1 sibling, 0 replies; 14+ messages in thread
From: Kenichi Handa @ 2009-12-14  1:21 UTC (permalink / raw)
  To: Yoshiaki Kasahara; +Cc: emacs-devel

In article <20091212.170921.154994048134698066.kasahara@nc.kyushu-u.ac.jp>, Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> writes:

> For several months I felt annoying that Emacs on a terminal (emacs
> -nw) ignored "C-y" until next key input. Even C-q C-y is not processed
> immediately ("^Y" doesn't show up on the screen) until I type another
> key. I tried from C-a to C-z, and only C-y was affected. It occured
> with emacs -Q -nw.

Thank you for finding this bug (a bug of EUC decoder).  I've
just installed a fix.

---
Kenichi Handa
handa@m17n.org




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-13 17:10         ` Miles Bader
@ 2009-12-15 13:12           ` Richard Stallman
  2009-12-16  0:33             ` Miles Bader
  2009-12-16  0:43             ` Kenichi Handa
  0 siblings, 2 replies; 14+ messages in thread
From: Richard Stallman @ 2009-12-15 13:12 UTC (permalink / raw)
  To: Miles Bader; +Cc: kasahara, emacs-devel

    It's not an input method, it's a keyboard encoding (in this case
    EUC-JP), and that's determined by an outsider party/standard/...

Perhaps we should support it but warn users to avoid it.  Maybe we
should offer a modified version adapted to work better with Emacs.




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-15 13:12           ` Richard Stallman
@ 2009-12-16  0:33             ` Miles Bader
  2009-12-17 11:11               ` Richard Stallman
  2009-12-16  0:43             ` Kenichi Handa
  1 sibling, 1 reply; 14+ messages in thread
From: Miles Bader @ 2009-12-16  0:33 UTC (permalink / raw)
  To: rms; +Cc: kasahara, emacs-devel

Richard Stallman <rms@gnu.org> writes:
>     It's not an input method, it's a keyboard encoding (in this case
>     EUC-JP), and that's determined by an outsider party/standard/...
>
> Perhaps we should support it but warn users to avoid it.  Maybe we
> should offer a modified version adapted to work better with Emacs.

Not necessary I guess -- from Kenichi's followup message, it sounds like
the problem was actually a bug in the EUC-JP decoder, not EUC-JP itself
(and I can't reproduce the problem with today's source).

-Miles

-- 
o The existentialist, not having a pillow, goes everywhere with the book by
  Sullivan, _I am going to spit on your graves_.




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-15 13:12           ` Richard Stallman
  2009-12-16  0:33             ` Miles Bader
@ 2009-12-16  0:43             ` Kenichi Handa
  2009-12-16  4:01               ` Yoshiaki Kasahara
  1 sibling, 1 reply; 14+ messages in thread
From: Kenichi Handa @ 2009-12-16  0:43 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel, kasahara, miles

In article <E1NKXCF-0004FR-CI@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:

>     It's not an input method, it's a keyboard encoding (in this case
>     EUC-JP), and that's determined by an outsider party/standard/...

> Perhaps we should support it but warn users to avoid it.  Maybe we
> should offer a modified version adapted to work better with Emacs.

As I wrote, this was a bug of decoder and is already fixed.
As far as I know, all coding systems derived from locale
(and thus automatically used as keyboard coding system) are
ascii-compatible.

It's possible that one tries set ascii-noncompatible coding
system to keyboard coding system manually, but
set-keyboard-coding-system already has a code to signal an
error in such a case.

---
Kenichi Handa
handa@m17n.org




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-16  0:43             ` Kenichi Handa
@ 2009-12-16  4:01               ` Yoshiaki Kasahara
  0 siblings, 0 replies; 14+ messages in thread
From: Yoshiaki Kasahara @ 2009-12-16  4:01 UTC (permalink / raw)
  To: handa; +Cc: emacs-devel

On Wed, 16 Dec 2009 09:43:18 +0900,
	Kenichi Handa <handa@m17n.org> said:

> As I wrote, this was a bug of decoder and is already fixed.
> As far as I know, all coding systems derived from locale
> (and thus automatically used as keyboard coding system) are
> ascii-compatible.

I feel relieved that it was actually a bug, and now I can use EUC-JP
locale without the problem.  My time of bisecting was not useless :-)

Thank you very much for fixing it.
-- 
Yoshiaki Kasahara
Research Institute for Information Technology, Kyushu University
kasahara@nc.kyushu-u.ac.jp




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

* Re: [23.1.50] C-y not processed immediately on a terminal
  2009-12-16  0:33             ` Miles Bader
@ 2009-12-17 11:11               ` Richard Stallman
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Stallman @ 2009-12-17 11:11 UTC (permalink / raw)
  To: Miles Bader; +Cc: kasahara, emacs-devel

    Not necessary I guess -- from Kenichi's followup message, it sounds like
    the problem was actually a bug in the EUC-JP decoder, not EUC-JP itself

That is good news.





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

end of thread, other threads:[~2009-12-17 11:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-12  8:09 [23.1.50] C-y not processed immediately on a terminal Yoshiaki Kasahara
2009-12-12  8:39 ` Yoshiaki Kasahara
2009-12-12  9:36   ` Miles Bader
2009-12-12  9:54     ` Eli Zaretskii
2009-12-12 10:07       ` Miles Bader
2009-12-12 13:47     ` Yoshiaki Kasahara
2009-12-13 16:22       ` Richard Stallman
2009-12-13 17:10         ` Miles Bader
2009-12-15 13:12           ` Richard Stallman
2009-12-16  0:33             ` Miles Bader
2009-12-17 11:11               ` Richard Stallman
2009-12-16  0:43             ` Kenichi Handa
2009-12-16  4:01               ` Yoshiaki Kasahara
2009-12-14  1:21 ` Kenichi Handa

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