From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.bugs Subject: Re: Inconsistent behaviour after inserting two latin-X files in buffer Date: Sun, 05 May 2002 20:31:05 +0300 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <2110-Sun05May2002203105+0300-eliz@is.elta.co.il> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1020619988 24041 127.0.0.1 (5 May 2002 17:33:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 5 May 2002 17:33:08 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, simon@josefsson.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 174Psi-0006Fe-00 for ; Sun, 05 May 2002 19:33:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 174Psk-0002HK-00; Sun, 05 May 2002 13:33:10 -0400 Original-Received: from thor.inter.net.il ([192.114.186.11]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 174Pro-0002Cz-00 for ; Sun, 05 May 2002 13:32:12 -0400 Original-Received: from Zaretsky ([80.230.2.40]) by thor.inter.net.il (Mirapoint Messaging Server MOS 3.1.0.54-GA) with ESMTP id ADS59545; Sun, 5 May 2002 20:31:49 +0300 (IDT) Original-To: jas@extundo.com X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 In-Reply-To: (message from Simon Josefsson on Sun, 05 May 2002 18:02:21 +0200) Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:1182 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:1182 > From: Simon Josefsson > 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 > 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 > 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.