emacs-devel
[Top][All Lists]
Advanced

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

Re: outline/allout/overlay performance


From: Stefan Monnier
Subject: Re: outline/allout/overlay performance
Date: Thu, 12 Jan 2006 18:32:37 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> i've made the transition to directly using outline-flag-region from
> allout mode (rather than allout having it's own allout-flag-region),
> and am using outline-flag-region as it stands.  to enable allout's
> custom isearch-open-invisible behavior, i'm defadvicing
> `outline-isearch-open-invisible' (which is what outline-flag-regexp
> assigns as the isearch-open-invisible property on the overlays) so
> that allout's preferred function, `allout-show-to-offshoot' is run,
> instead, when the outline is in allout-mode.  this works very nicely!

But doesn't work for reveal-mode which doesn't use
outline-isearch-open-invisible.

If all you reuse from outline is outline-flag-region, then it really doesn't
justify a defadvice.  Just copy outline-flag-region into allout-flag-region
and modify it: of the 6 lines, one is obsolete and one should be changed
(to avoid the ugliness of defavice).  Also having your own copy will allow
you to use `allout' as the symbol to add to the invisibility-spec, which
is cleaner.

> fortunately, it doesn't look like overlays need that consolidation.  i
> don't know how they're implemented, but it seems like they
> "consolidated" on their own.

Yes, I tried to "consolidate" them in outline as well and then realized that
(if you think about it, rather than code blindly, it's pretty obvious)
there's never any opportunity for consolidation because the area just
before/after the hidden text is always visible (it's a heading).


        Stefan




reply via email to

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