emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: FW: [21.1.90]: should coding be recalculated on reve


From: Eli Zaretskii
Subject: Re: address@hidden: FW: [21.1.90]: should coding be recalculated on revert-buffer?]
Date: Tue, 26 Feb 2002 22:42:32 +0200

> Date: Tue, 26 Feb 2002 13:13:54 -0700 (MST)
> From: Richard Stallman <address@hidden>
> 
>     Here the user visited the file with Latin-2, then changed the file's 
>     encoding on disk into UTF-8, then reverted the buffer.  Should Emacs 
>     autodetect in this case or not?
> 
> I tend to think it should do so.  revert-buffer recalculates the file
> modes based on changes in the -*- line, and that suggests it is
> consistent for revert-buffer to recalculate everything based on the
> file's new contents.

One could argue that, since the original visit was with "C-x RET c",
the user wants to force Emacs to use that coding system.  A situation
where that would make sense is if instead of running `recode', the
file would be modified on disk in some other way that doesn't change
its encoding, just the contents.

In other words, the Right Thing depends on how was the file changed
behind Emacs's back; obviously, Emacs cannot know that by itself,
given that autodetection is not reliable enough in many cases.



reply via email to

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