emacs-devel
[Top][All Lists]
Advanced

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

Re: Unbalanced change hooks (part 2) [Documentation fix still remaining]


From: Phillip Lord
Subject: Re: Unbalanced change hooks (part 2) [Documentation fix still remaining]
Date: Wed, 31 Aug 2016 12:17:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Stefan Monnier <address@hidden> writes:
>> I was under the impression that Phillip wanted the data be accurate,
>> not just valid.
>
> More precise (i.e. tighter bounds) is better, but valid is indispensable
> (I used "valid" to mean that every change is covered by the bounds, even
> though those bounds may be too lose.  I consider "invalid" to be a plain
> bug, as in insert-file-contents, for example).
>
> So I'm pretty sure he's more concerned about "proper pairing" than about
> "utmost tightness of the bounds".

This is exactly correct. I think in my last email I was using "valid" to
mean consistent between b-c-f and a-c-f; sorry for confused terminology.

>
>> Because if validity is the only requirement, we could always call the
>> before-change hook with the limits of the entire buffer, and be done.
>> Clearly, that would not be very useful, to say the least.
>
> Indeed.  But in the case of subst-chars-in-region, what we pass to b-c-f
> is suboptimal but better than point-min/max, so there's a useful middle
> point between the difficult "tightest bound" and the degenerate "just
> pass point-min/max".

I think you mean "painful middle point" rather than "useful"!

Well, it's been on my list of things to do for a while. I will have
another look at subst-char-in-region, to see if I can work out whether
having b-c-f accurately signal the start is possible.

Phil



reply via email to

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