[Top][All Lists]

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

Re: When suggesting a file recovery, emacs should maybe check for actual

From: Eli Zaretskii
Subject: Re: When suggesting a file recovery, emacs should maybe check for actual changes
Date: Sun, 02 Oct 2022 18:49:57 +0300

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sun, 2 Oct 2022 08:07:33 -0700
> Cc: andrea.monaco@autistici.org, emacs-devel@gnu.org
> Eli Zaretskii <eliz@gnu.org> writes:
> > I'm asking if this is an important enough situation to add code that
> > could be buggy to a feature that basically must be 110% safe?
> You're right that it sounds a bit scary on the face of it.
> Maybe it's okay if we do it in Emacs 30, and add tests?  Adding tests
> would of course be good even if we don't make any changes.

Adding tests is always welcome.  But the thing with safety belts is
that they are always important in edge cases that are hard to test.

I think it could be okay to compare plain-ASCII files to their
auto-save files (but even there we'd need to be aware of EOL
differences, which will almost always happen on Windows, for
example).  I'd hesitate to do this with non-ASCII files.

> My usual response, if I care enough about the file, is to manually make
> a copy, restore the file from Emacs, and then check the diff.  Now that
> I think about it, this suggests another nice feature to have would be to
> show the diff directly from the Emacs prompt.

Again, if you intend to run the Diff utility, it will show differences
due to encoding and EOL format.

reply via email to

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