[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: -*- construct on the second line doesn't work on nte
From: |
Jason Rumney |
Subject: |
Re: address@hidden: -*- construct on the second line doesn't work on ntemacs] |
Date: |
Thu, 13 Oct 2005 21:50:40 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) |
"Richard M. Stallman" <address@hidden> 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.