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: Eli Zaretskii
Subject: Re: Unbalanced change hooks (part 2) [Documentation fix still remaining]
Date: Mon, 29 Aug 2016 21:04:42 +0300

> Cc: address@hidden, address@hidden
> From: Daniel Colascione <address@hidden>
> Date: Mon, 29 Aug 2016 10:48:31 -0700
> 
> 1) Something b-c-f is not called _at_ _all_ before certain changes
> 2) Sometimes b-c-f is called once, then a-c-f is called multiple times, 
> because internally, changes are split into several chunks, each of which 
> gets its own a-c-f call
> 
> I can understand #2 being wontfix, but can you reconsider fixing #1?

There's only one such case, and the only package that's affected
(CC Mode) already worked around that case.

So, while I agreed that #1 should probably be fixed, and even
suggested how to do that in the least risky way, actually doing that
is not a priority, IMO, not until we have a very grave problem caused
by it.

> #1 breaks the entire b-c-f model --- "hey, I'm about to modify the
> buffer, so throw away caches" ---- and can lead to anything with a
> cache flush in b-c-f (like syntax-ppss) not properly discarding
> out-of-date buffer information.

That single case of #1 is revert-buffer, which conceptually throws
away the entire buffer and replaces it with what's on disk.  That it
actually keeps portions of the buffer is an optimization, but the
concept still stands.  So I don't see how it breaks the entire model,
at least not in practice.



reply via email to

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