From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: [rahed@e-last-minute.com: -*- construct on the second line doesn't work on ntemacs] Date: Thu, 13 Oct 2005 21:50:40 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129237057 1628 80.91.229.2 (13 Oct 2005 20:57:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Oct 2005 20:57:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 13 22:57:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EQA4T-0006md-PN for ged-emacs-devel@m.gmane.org; Thu, 13 Oct 2005 22:53:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQA4T-0003g0-FO for ged-emacs-devel@m.gmane.org; Thu, 13 Oct 2005 16:53:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EQA4J-0003fl-Mx for emacs-devel@gnu.org; Thu, 13 Oct 2005 16:52:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EQA4I-0003fY-9R for emacs-devel@gnu.org; Thu, 13 Oct 2005 16:52:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQA4I-0003fV-5j for emacs-devel@gnu.org; Thu, 13 Oct 2005 16:52:50 -0400 Original-Received: from [194.106.33.237] (helo=outmail.freedom2surf.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EQA4A-0002r1-E9; Thu, 13 Oct 2005 16:52:42 -0400 Original-Received: from wanchan.jasonrumney.net (i-83-67-23-108.freedom2surf.net [83.67.23.108]) by outmail.freedom2surf.net (8.12.10/8.12.10) with ESMTP id j9DKq7ch019260; Thu, 13 Oct 2005 21:52:07 +0100 Original-Received: from TONKOTSU-RAMEN (tonkotsu-ramen.jasonrumney.net [10.0.0.28]) by wanchan.jasonrumney.net (Postfix) with ESMTP id DFD255FB; Thu, 13 Oct 2005 21:52:05 +0100 (BST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Thu, 13 Oct 2005 16:10:32 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44003 Archived-At: "Richard M. Stallman" writes: > Would someone who uses Windows see if this is still broken? > Putting # -*-coding: utf-8;-*- construct on the second line with > shebang #! on the first line is ineffective. It seems to work now. Trying to save such a file produces a warning about the coding tag not matching buffer-file-coding-system: Selected encoding iso-latin-1-dos disagrees with utf-8-dos specified by file contents. Really save (else edit coding cookies and try again)? (y or n) I don't like this message for two reasons: 1. It is not clear what will happen if I press y. Will the file be saved as iso-latin-1 or utf-8? 2. It suggests editing the coding cookies, but if I have just created a new file and added a coding cookie, it is more likely that the coding cookie is correct, and it is buffer-file-coding-system that I want to change. I think it might be better to not display this message at all if all the characters in the buffer can be encoded in the coding-system specified in the coding tag. If the file had a coding tag before it was read, then the buffer-file-coding-system will have been set appropriately. So the only case where this can happen is when the user (or lisp code) adds such a cookie themselves, in which case they will always want to save the buffer in the encoding they specifed.