Subject: Re: bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified

From: Óscar Fuentes <[email-masked]>
Date: Sun, 27 Mar 2016 18:21:55 +0200

Lars Magne Ingebrigtsen <[email-masked]> writes:

> Óscar Fuentes <[email-masked]> writes:
>
>> When you type `a', you changed the buffer. Checking that your subsequent
>> actions gives a result that is identical to the saved file is something
>> that would be nice to have, but I guess that few users would think that
>> it is a reasonable requirement.
>
> I think that would be a very nice feature, though.  Like, if Emacs
> computed the hash of the buffer when you loaded it, and then checks
> again every time you edit something, and uses that for the "buffer
> changed" marker.  :-)

Interesting... :-)

> It's probably unrealistically slow, though.

I don't think so. It could be auto-disabled for large buffers and the
check would only take place when the size of the buffer is the same as
the size of the original file. Then, the hash would be calculated on a
idle timer that is fired after a command that changes the contents...

It is doable, moreover if the current hash function is so inefficient as
you say. MD5 is rated at more than a hundred MB/s on not-so-new
hardware.