emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SPG,spf=20]Re: Why ("/#[^/]+#\\'" . emacs-mule) ?


From: Per Starbäck
Subject: Re: [SPG,spf=20]Re: Why ("/#[^/]+#\\'" . emacs-mule) ?
Date: Tue, 26 Mar 2013 16:57:58 +0100

>> Very often when I open them I have to immediately use
>> revert-buffer-with-coding-system because they are utf8 files.
>
> Strange that you need that.  When I do "M-x recover-this-file RET", I
> get a buffer in utf-8-emacs-unix, which is what I expect.

I wasn't talking about recover-this-file though. I was talking about
just opening the file.

> The purpose is back-compatibility with auto-save files from prior
> versions.

Back-compatibility is nice, but if we only can open old files *or* new
files correctly the choice should obviously be the new files.

But is that choice even necessary? I dug up an old autosave file I had
(from 2003) with non-ascii characters in it.
Opening it in an Emacs of today worked fine, identifying it correctly
as emacs-mule-unix.
But the setting in auto-coding-alist wasn't necessary for that, but
that was done by normal coding-recognition as well.

I removed the entry ("/#[^/]+#\\'" . emacs-mule) from
auto-coding-alist, and now I can open both old and new autosave files
correctly.
If there are no non-ascii characters I get undecided instead of
emacs-mule with the same buffer contents, which I don't see as a
drawback.

I think the current situation where Emacs can't correctly open files
it is creating itself doesn't make sense. What would make sense
is one of:

1. Remove the #-line in auto-coding-alist and let Emacs detect coding
system normally. Maybe it won't work for some file, I don't know,
but that is no big deal since you don't open these that often.

2. Replace emacs-mule with utf-8-emacs so it works for current files.
It won't work for old autosave files, but that is no big deal since
you almost never open those.

3. Make some special detection rule for autosave files that only
detects if it is utf-8-emacs or emacs-mule. The "perfect" solution,
but
too ambitious for this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]