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: Clément Pit--Claudel
Subject: Re: Don't complain about changed file when it hasn't changed
Date: Sun, 28 Aug 2016 23:43:46 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 2016-08-28 23:39, Daniel Colascione wrote:
> On 08/28/2016 08:36 PM, Clément Pit--Claudel wrote:
>> On 2016-08-28 20:29, Stefan Monnier wrote:
>>> The patch below is supposed to change Emacs such that if the file's
>>> timestamp has changed, but the contents is still the same, it doesn't
>>> prompt the user about a supersession-threat.
>>>
>>> Any objection?
>>
>> This sounds like a neat feature! Are you sure you want (point-min)
>> and
> (point-max) rather than 1 and (buffer-size), though?
> 
> The code widens the buffer first.

That's right! It there an advantage to doing save-restriction + widen + 
point-min-point-max instead of using 1 and buffer-size?

>> Also, maybe this should be predicated on a test for small-enough
> files? For large-ish files, it could make things slow.
> 
> Memory is very fast these days, and compare-buffer-substrings is efficient.

I was concerned about insert-file-contents :)

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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