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

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

Re: Inconsistent behaviour after inserting two latin-X files in buffer


From: Eli Zaretskii
Subject: Re: Inconsistent behaviour after inserting two latin-X files in buffer
Date: Sun, 05 May 2002 20:31:05 +0300

> From: Simon Josefsson <jas@extundo.com>
> Date: Sun, 05 May 2002 18:02:21 +0200
> 
> $ emacs -q --no-site-file
> C-x RET c latin-1 C-x i ~/latin-1
> C-x RET c latin-2 C-x i ~/latin-2
> <remove the text inserted by the first C-x i.)
> C-x C-s
> 
> You are now queried for the coding system to save the buffer as, with
> iso-8859-2 as the default.
> 
> $ emacs -q --no-site-file
> C-x RET c latin-2 C-x i ~/latin-2
> C-x RET c latin-1 C-x i ~/latin-1
> <remove the text inserted by the first C-x i.)
> C-x C-s
> 
> The file is immediately saved as latin-1.
> 
> The latter behaviour is preferable IMHO, if it is done safely.
> 
> Why doesn't emacs treat all latin encodings equally?  It seems to like
> latin-1 better above.

This happens because your language environment is set to Latin-1.
(It is set so by default, since your locale-related environment
variables are all unset.)  The silent use of latin-1 is reserved only
for the most preferred coding system.  Emacs avoids asking the
question in that case for the sake of the situation where you type
your ``native'' characters into an otherwise plain-ASCII buffer, then
save that buffer.

If you set your language environment to Latin-2, the result of your
example should be reversed: latin-2 encoding will be used silently,
while latin-1 will require a confirmation.



reply via email to

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