emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hoo


From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents
Date: Sat, 21 Jul 2018 14:44:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> I don't understand enough of the code to have an opinion on it, but the
>> comments describe a behavior which would be wrong: both before-c-f and
>> after-c-f- need to be run for any buffer change, even if it's only an
>> insertion or only a deletion.
> What if there's no change at all, i.e. no deletions and no insertions?

Then you can either run neither of the hooks, or both.

> That was the OP's recipe.

My comment wasn't directly related to the bug-report.

>> > And what would you expect to see in the buffer
>> > modification hooks calls for the recipe of that bug?
>> 
>> Lots of options, but basically: one call to b-c-f with FROM being < then
>> the first position at which a deletion or insertion will take place and
>> TO being after the last such position (e.g. from==to if the change is
>> a single insertion); followed by one call to a-c-f with the
>> same constraints (e.g. from==to if it's a single deletion).
>
> You did read the bug report, didn't you?  Because unless I completely
> misunderstand what you are saying, you are not describing the bug's
> recipe.

Yes, I did.  All I read in the report seems fine, and your commit
message sounds right as well.  But the comments seem to describe an
incorrect behavior.


        Stefan




reply via email to

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