help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to use new Emacsen with non-ASCII?


From: David Kastrup
Subject: Re: Is it possible to use new Emacsen with non-ASCII?
Date: Fri, 23 May 2008 00:09:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Ilya Zakharevich <address@hidden> writes:

> [A complimentary Cc of this posting was sent to
> Eli Zaretskii 
> <address@hidden>], who wrote in article <address@hidden>:
>> Sorry, I spoke too soon (I guess I underestimated how long ago I
>> switched from Emacs 21.x to 22.x).  Here's the equivalent recipe for
>> Emacs 21:
>> 
>>   emacs -q --no-site-file
>>   M-x set-language-environment RET Cyrillic-KOI8 RET
>>   C-x RET t Cyrillic-KOI8 RET
>>   C-x RET k Cyrillic-KOI8 RET
>
> I spoke too soon.  Typed literally, it works.  But the "equivalent"
> programmatic code does not:
>
> (let ((v (getenv "EMACS_LANGENV")))
>   (and v (progn
>            (set-language-environment v)
>            (set-terminal-coding-system (intern v))
>            (set-keyboard-coding-system (intern v))
>            (set-input-mode (car (current-input-mode))
>                            (nth 1 (current-input-mode))
>                            '8bit)
>            (run-with-idle-timer
>             5 nil 'message              ; Once, after 5 sec of inactivity
>             "Switch Cyr/Lat by Ctrl-\\, Cyr-Yawerty/Cyr-GOST by f9 \\"))))
>
> I get
>
>     Debugger entered--Lisp error: (coding-system-error Cyrillic-KOI8)
>       set-terminal-coding-system-internal(Cyrillic-KOI8)
>       set-terminal-coding-system(Cyrillic-KOI8)
>
> What did I do wrong?

'cyrillic-koi8 and 'Cyrillic-KOI8 are different symbols.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]