unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Inconsistent behaviour after inserting two latin-X files in buffer
@ 2002-05-05 16:02 Simon Josefsson
  2002-05-05 17:31 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Josefsson @ 2002-05-05 16:02 UTC (permalink / raw)
  Cc: simon

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

In GNU Emacs 21.2.50.3 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-05-05 on localhost.localdomain
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

This applies to Emacs 21.2 as well.  The files ~/latin-1 and ~/latin-2
should contain codepoints endemic to those coding systems, I'm
including examples below.

(LANG/LC_* settings as above)

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

~/latin-1:
foo þÆ
~/latin-2

[-- Attachment #2: Type: text/plain, Size: 8 bytes --]

źedana

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

* Re: Inconsistent behaviour after inserting two latin-X files in buffer
  2002-05-05 16:02 Inconsistent behaviour after inserting two latin-X files in buffer Simon Josefsson
@ 2002-05-05 17:31 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2002-05-05 17:31 UTC (permalink / raw)
  Cc: bug-gnu-emacs, simon

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

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

end of thread, other threads:[~2002-05-05 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-05 16:02 Inconsistent behaviour after inserting two latin-X files in buffer Simon Josefsson
2002-05-05 17:31 ` Eli Zaretskii

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