emacs-devel
[Top][All Lists]
Advanced

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

Re: Don't complain about changed file when it hasn't changed


From: Karl Fogel
Subject: Re: Don't complain about changed file when it hasn't changed
Date: Tue, 06 Sep 2016 17:21:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Davis Herring <address@hidden> writes:
>You just remember the file's size as well as its modtime when visiting
>it -- don't compare to the buffer's size at all.  (I thought I had
>mentioned this earlier in the thread...)

Oh -- remember the "true" size (that is, the 
unencrypted/uncompressed/unwhatevered) size of the file at the moment when it 
is first visited?

As long as we're doing that, why not just remember the md5sum of the original 
content too?  Then if the file size is the same, we can just compute the md5sum 
of current buffer contents and compare against the saved md5sum.



reply via email to

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