From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: outline/allout/overlay performance Date: Thu, 12 Jan 2006 18:32:37 -0500 Message-ID: <87vewpjad4.fsf-monnier+emacs@gnu.org> References: <2cd46e7f0601091127w7f988942w33a105481ccd02e0@mail.gmail.com> <2cd46e7f0601110821x5c97c63bj25d80df70240c80e@mail.gmail.com> <2cd46e7f0601111223m4e568b56n283d038ccfff6be0@mail.gmail.com> <2cd46e7f0601111400j452ee7dexfc79b643ee3655d0@mail.gmail.com> <2cd46e7f0601121440t14dddf55lcb14b078bd9ecfcf@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137108797 13447 80.91.229.2 (12 Jan 2006 23:33:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2006 23:33:17 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 13 00:33:07 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ExBwB-00056p-Vp for ged-emacs-devel@m.gmane.org; Fri, 13 Jan 2006 00:33:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExByI-0003Ry-7I for ged-emacs-devel@m.gmane.org; Thu, 12 Jan 2006 18:35:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ExBy1-0003Rf-OW for emacs-devel@gnu.org; Thu, 12 Jan 2006 18:34:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ExBxz-0003R3-T5 for emacs-devel@gnu.org; Thu, 12 Jan 2006 18:34:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExBxy-0003Qk-I5 for emacs-devel@gnu.org; Thu, 12 Jan 2006 18:34:51 -0500 Original-Received: from [209.226.175.54] (helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ExC0r-0006bk-2S for emacs-devel@gnu.org; Thu, 12 Jan 2006 18:37:49 -0500 Original-Received: from alfajor ([67.71.26.73]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060112233237.OOXW14963.tomts10-srv.bellnexxia.net@alfajor>; Thu, 12 Jan 2006 18:32:37 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id B3AD1D72CB; Thu, 12 Jan 2006 18:32:37 -0500 (EST) Original-To: Ken Manheimer In-Reply-To: <2cd46e7f0601121440t14dddf55lcb14b078bd9ecfcf@mail.gmail.com> (Ken Manheimer's message of "Thu, 12 Jan 2006 17:40:48 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48973 Archived-At: > 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