unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonr@gnu.org>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <ull0x16qn.fsf@jasonrumney.net> (raw)
In-Reply-To: <E1EQ9PM-0007FQ-En@fencepost.gnu.org> (Richard M. Stallman's message of "Thu, 13 Oct 2005 16:10:32 -0400")

"Richard M. Stallman" <rms@gnu.org> 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.

  reply	other threads:[~2005-10-13 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-13 20:10 [rahed@e-last-minute.com: -*- construct on the second line doesn't work on ntemacs] Richard M. Stallman
2005-10-13 20:50 ` Jason Rumney [this message]
2005-10-14 17:36   ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ull0x16qn.fsf@jasonrumney.net \
    --to=jasonr@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).