From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4816: change of coding system without inquiry Date: Thu, 29 Oct 2009 20:57:12 -0400 Message-ID: References: <4AE77C59.5060106@informatik.uni-muenchen.de> Reply-To: Stefan Monnier , 4816@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256864856 12257 80.91.229.12 (30 Oct 2009 01:07:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Oct 2009 01:07:36 +0000 (UTC) Cc: 4816@emacsbugs.donarmstrong.com To: eisinger@informatik.uni-muenchen.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 30 02:07:28 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N3fxg-0006RP-2w for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Oct 2009 02:07:28 +0100 Original-Received: from localhost ([127.0.0.1]:41620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3fxf-0003xz-CW for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Oct 2009 21:07:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3fxa-0003wO-LK for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2009 21:07:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3fxV-0003sQ-SR for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2009 21:07:22 -0400 Original-Received: from [199.232.76.173] (port=39615 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3fxV-0003sC-N1 for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2009 21:07:17 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34931) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N3fxV-0004TZ-3a for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2009 21:07:17 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9U17EkG012403; Thu, 29 Oct 2009 18:07:14 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n9U1552o011697; Thu, 29 Oct 2009 18:05:05 -0700 Resent-Date: Thu, 29 Oct 2009 18:05:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 30 Oct 2009 01:05:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4816 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4816-submit@emacsbugs.donarmstrong.com id=B4816.125686424010914 (code B ref 4816); Fri, 30 Oct 2009 01:05:05 +0000 Original-Received: (at 4816) by emacsbugs.donarmstrong.com; 30 Oct 2009 00:57:20 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9U0vI2k010910 for <4816@emacsbugs.donarmstrong.com>; Thu, 29 Oct 2009 17:57:20 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4EALrW6UpLd/xb/2dsb2JhbACBT908hD0EiFY X-IronPort-AV: E=Sophos;i="4.44,649,1249272000"; d="scan'208";a="48397578" Original-Received: from 75-119-252-91.dsl.teksavvy.com (HELO ceviche.home) ([75.119.252.91]) by ironport2-out.pppoe.ca with ESMTP; 29 Oct 2009 20:57:12 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 98932B44D0; Thu, 29 Oct 2009 20:57:12 -0400 (EDT) In-Reply-To: <4AE77C59.5060106@informatik.uni-muenchen.de> (Norbert Eisinger's message of "Wed, 28 Oct 2009 00:03:53 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 29 Oct 2009 21:07:22 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32284 Archived-At: > When I edit a non-latin-1 character into a latin-1 file and then save it, > Emacs saves the file in UTF-8 without inquiry. It omits the dialogue that > would inform me about the offending character and would offer me to select > a coding system for saving. [...] > If suppression of the dialogue is intended and not a bug: is there > some variable with which I can specify that I want to get that > dialogue anyway? In Emacs-23, the preferred charset has been changed to utf-8, so when opening a new file, we first try utf-8 (both because it's expected to be the standard coding-system in GNU/Linux systems nowadays, and because there are very few files that are encoded with something else than utf-8 and yet they also happen to be valid utf-8 files). So when saving a file in a latin-1 locale, both latin-1 and utf-8 can be used "interchangeably" by Emacs. There is currently no direct way to ask Emacs to prompt when changing the coding system (probably mostly because changing it is common when changing it from us-ascii (as used for empty files or other files without non-ascii chars) to something else). Could you explain the context in which this problem showed up? (e.g. tell us why the coding system used matters, whether or not you've specified the coding-system in a "-*-coding-*-" cookie and why, etc...) BTW, in Emacs-23.2, the code has been slightly changed to always obey the coding cookie in a file, so if you file has a "coding:latin-1" cookie, then Emacs will not silently save it in any other coding-system. Stefan