all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug#435452: emacs22: `set-keyboard-coding-system' fails in non-X11 mode]
       [not found]   ` <87y7fvbp6r.fsf_-_@gmx.de>
@ 2007-08-29 20:05     ` ludo, Ludovic =?UTF-8?Q?Court=C3=A8s
  2007-08-30  1:08       ` Kenichi Handa
  0 siblings, 1 reply; 5+ messages in thread
From: ludo, Ludovic =?UTF-8?Q?Court=C3=A8s @ 2007-08-29 20:05 UTC (permalink / raw)
  To: Sven Joachim; +Cc: Ludovic Courtes, 435452, rms, emacs-devel, handa

Hi,

Sven Joachim <svenjoac@gmx.de> writes:

>>> Invoking `set-keyboard-coding-system' in an "emacs -nw" session fails.
>>> For instance, asking it `no-conversion' (which is needed so that dead
>>> keys work as expected) fails:
>>
>>>   Unsupported coding system in Encoded-kbd mode: no-conversion
>>
>> I don't understand why you have to set
>> keyboard-coding-system to no-conversion for dead keys.  Dead
>> keys must be handled by terminal, and Emacs just receives
>> the resulting character (encoded in your locale) from the
>> terminal.  So, setting keyboard-coding-system to what is
>> appropriate for your locale should work well, and that
>> should be done automatically.

Indeed, using "C" as my locale fixes the problem (I used to have
"LC_CTYPE=fr_FR").

Strangely enough, Emacs 21.4.1 with "LC_CTYPE=fr_FR" doesn't have the
problem (i.e., dead keys are usable).

Checking the "Meta Sends Escape" box of the xterm in which I run Emacs
22 also fixes the problem, even with a non-C locale.

I guess I'm just displaying my lack of familiarity with how terminals
work...

>> What other choices were tried?  utf-8, latin-X should all
>> work.  What is your locale?

With a "C" locale, utf-8, latin-1, and others are accepted, whereas
`no-conversion' yields the above error message.

Thanks,
Ludovic.



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

* Re: Bug#435452: emacs22: `set-keyboard-coding-system' fails in non-X11 mode]
  2007-08-29 20:05     ` Bug#435452: emacs22: `set-keyboard-coding-system' fails in non-X11 mode] ludo, Ludovic =?UTF-8?Q?Court=C3=A8s
@ 2007-08-30  1:08       ` Kenichi Handa
  2007-08-30 20:55         ` ludo, Ludovic =?UTF-8?Q?Court=C3=A8s
  0 siblings, 1 reply; 5+ messages in thread
From: Kenichi Handa @ 2007-08-30  1:08 UTC (permalink / raw)
  To: Ludovic =?ISO-2022-JP-2?B?Q291cnQbJChEKzIbKEJz?=
  Cc: 435452, emacs-devel, svenjoac, rms, ludovic.courtes

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=ISO-2022-JP-2, Size: 2031 bytes --]

In article <87hcmi2jj8.fsf@chbouib.org>, ludo@gnu.org (Ludovic Court^[$(D+2^[(Bs) writes:

> Hi,
> Sven Joachim <svenjoac@gmx.de> writes:

>>>> Invoking `set-keyboard-coding-system' in an "emacs -nw" session fails.
>>>> For instance, asking it `no-conversion' (which is needed so that dead
>>>> keys work as expected) fails:
>>> 
>>>> Unsupported coding system in Encoded-kbd mode: no-conversion
>>> 
>>> I don't understand why you have to set
>>> keyboard-coding-system to no-conversion for dead keys.  Dead
>>> keys must be handled by terminal, and Emacs just receives
>>> the resulting character (encoded in your locale) from the
>>> terminal.  So, setting keyboard-coding-system to what is
>>> appropriate for your locale should work well, and that
>>> should be done automatically.

> Indeed, using "C" as my locale fixes the problem (I used to have
> "LC_CTYPE=fr_FR").

> Strangely enough, Emacs 21.4.1 with "LC_CTYPE=fr_FR" doesn't have the
> problem (i.e., dead keys are usable).

Does it mean that you have a problem with Emacs 22 with
LC_CTYPE=fr_FR?  In that locale, "emacs -nw" should
automatically set keyboard-coding-system to latin-1 and the
input mode to (t nil 0 7), and thus it should accept latin-1
characters sent from a terminal correctly.  What happens
when you type some latin-1 character with dead-key method
under LC_CTYPE=fr_FR?

> Checking the "Meta Sends Escape" box of the xterm in which I run Emacs
> 22 also fixes the problem, even with a non-C locale.

It seems that your Emacs' input mode is set not to accept
8-bit input.  Please tell me what is shown by
  ESC : (current-input-mode) RET

> I guess I'm just displaying my lack of familiarity with how terminals
> work...

>>> What other choices were tried?  utf-8, latin-X should all
>>> work.  What is your locale?

> With a "C" locale, utf-8, latin-1, and others are accepted, whereas
> `no-conversion' yields the above error message.

That is because setting keyboard-coding-system to
no-conversion is useless.

---
Kenichi Handa
handa@m17n.org

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

* Bug#435452: emacs22: `set-keyboard-coding-system' fails in non-X11 mode]
  2007-08-30  1:08       ` Kenichi Handa
@ 2007-08-30 20:55         ` ludo, Ludovic =?UTF-8?Q?Court=C3=A8s
  2007-08-31 14:36           ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: ludo, Ludovic =?UTF-8?Q?Court=C3=A8s @ 2007-08-30 20:55 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: svenjoac, ludovic.courtes, 435452, rms, emacs-devel

Hi,

Kenichi Handa <handa@m17n.org> writes:

> In article <87hcmi2jj8.fsf@chbouib.org>, ludo@gnu.org (Ludovic Courtès) writes:

>> Indeed, using "C" as my locale fixes the problem (I used to have
>> "LC_CTYPE=fr_FR").
>
>> Strangely enough, Emacs 21.4.1 with "LC_CTYPE=fr_FR" doesn't have the
>> problem (i.e., dead keys are usable).
>
> Does it mean that you have a problem with Emacs 22 with
> LC_CTYPE=fr_FR?

Yes: dead keys (e.g., Meta) won't work.

> In that locale, "emacs -nw" should
> automatically set keyboard-coding-system to latin-1 and the
> input mode to (t nil 0 7), and thus it should accept latin-1
> characters sent from a terminal correctly.  What happens
> when you type some latin-1 character with dead-key method
> under LC_CTYPE=fr_FR?

Typing M-x yields the `ø' ("o slash") character instead of running
`execute-extended-command'.

Typing accented characters with the `latin-1-prefix' input method, for
instance, does work, but I'm not sure how this relates to the fact that
Meta doesn't work.

>> Checking the "Meta Sends Escape" box of the xterm in which I run Emacs
>> 22 also fixes the problem, even with a non-C locale.
>
> It seems that your Emacs' input mode is set not to accept
> 8-bit input.  Please tell me what is shown by
>   ESC : (current-input-mode) RET

=> (t nil 0 7)

Thanks,
Ludovic.



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

* Re: Bug#435452: emacs22: `set-keyboard-coding-system' fails in non-X11 mode]
  2007-08-30 20:55         ` ludo, Ludovic =?UTF-8?Q?Court=C3=A8s
@ 2007-08-31 14:36           ` Stefan Monnier
  2007-09-01 10:09             ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2007-08-31 14:36 UTC (permalink / raw)
  To: Ludovic Courtès
  Cc: rms, Kenichi Handa, ludovic.courtes, emacs-devel, 435452,
	svenjoac

> Typing M-x yields the `ø' ("o slash") character instead of running
> `execute-extended-command'.

This is because your terminal sends the exact same byte sequence (in this
case it's actually a single byte) when you type M-x as when you type ø, so
Emacs has no way to distinguish the two: it chooses to interpret the byte as
ø here (which messes up the M-x case) and you could tell it to interpret it
as M-x (which would mess up the ø case).

>>> Checking the "Meta Sends Escape" box of the xterm in which I run Emacs
>>> 22 also fixes the problem, even with a non-C locale.

Indeed, that's the right solution because it tells your Terminal to use
different byte-sequences for the two different cases.


        Stefan

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

* Re: Bug#435452: emacs22: `set-keyboard-coding-system' fails in non-X11 mode]
  2007-08-31 14:36           ` Stefan Monnier
@ 2007-09-01 10:09             ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2007-09-01 10:09 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: rms, Kenichi Handa, ludovic.courtes, emacs-devel, 435452,
	svenjoac

Hi,

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> Typing M-x yields the `ø' ("o slash") character instead of running
>> `execute-extended-command'.
>
> This is because your terminal sends the exact same byte sequence (in this
> case it's actually a single byte) when you type M-x as when you type ø, so
> Emacs has no way to distinguish the two: it chooses to interpret the byte as
> ø here (which messes up the M-x case) and you could tell it to interpret it
> as M-x (which would mess up the ø case).

I see, thanks for the clarification!

> Indeed, that's the right solution because it tells your Terminal to use
> different byte-sequences for the two different cases.

Understood.

Thanks,
Ludovic.

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

end of thread, other threads:[~2007-09-01 10:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1IPQsY-0001cQ-K1@fencepost.gnu.org>
     [not found] ` <E1IPwDo-000119-9m@etlken.m17n.org>
     [not found]   ` <87y7fvbp6r.fsf_-_@gmx.de>
2007-08-29 20:05     ` Bug#435452: emacs22: `set-keyboard-coding-system' fails in non-X11 mode] ludo, Ludovic =?UTF-8?Q?Court=C3=A8s
2007-08-30  1:08       ` Kenichi Handa
2007-08-30 20:55         ` ludo, Ludovic =?UTF-8?Q?Court=C3=A8s
2007-08-31 14:36           ` Stefan Monnier
2007-09-01 10:09             ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.