From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Narrow/widen in folding.el Date: Wed, 22 Dec 2010 12:02:44 +0100 Message-ID: <87vd2mysrv.fsf@member.fsf.org> References: <87mxnz9dd1.fsf@member.fsf.org> <87zkryz0h0.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293068420 14176 80.91.229.12 (23 Dec 2010 01:40:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Dec 2010 01:40:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Leo Alekseyev Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 23 02:40:14 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PVaA4-0004B9-Ff for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Dec 2010 02:40:10 +0100 Original-Received: from localhost ([127.0.0.1]:40273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVaA2-000450-VH for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Dec 2010 20:40:06 -0500 Original-Received: from [140.186.70.92] (port=36842 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVMT2-0008Ua-PL for help-gnu-emacs@gnu.org; Wed, 22 Dec 2010 06:02:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVMT0-00089H-W7 for help-gnu-emacs@gnu.org; Wed, 22 Dec 2010 06:02:48 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:19514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVMT0-000895-LP for help-gnu-emacs@gnu.org; Wed, 22 Dec 2010 06:02:46 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 71EFE780155B; Wed, 22 Dec 2010 12:02:45 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26811-08; Wed, 22 Dec 2010 12:02:44 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad (tsdh.uni-koblenz.de [141.26.67.142]) by deliver.uni-koblenz.de (Postfix) with ESMTP id B525A78014C4; Wed, 22 Dec 2010 12:02:44 +0100 (CET) In-Reply-To: (Leo Alekseyev's message of "Wed, 22 Dec 2010 01:14:12 -0800") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Wed, 22 Dec 2010 20:34:27 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77809 Archived-At: Leo Alekseyev writes: Hi Leo, > The problem with this approach, though, is the overly rigid structure: > the end of one fold is necessarily the beginning of another fold. For > some use cases, it works rather well. Sometimes, however, I simply > want a piece of text folded without it being logically tied to any > hierarchy. Hm, ok. I never had the need for arbitrary folding, but only to coarse-grained hierarchical folding (outline-minor-mode) and syntactical folding wrt. some programming language (hs-minor-mode and friends). But concerning folding.el and isearch: folding.el should put a special text properties on the overlay. ,----[ (info "(elisp)Invisible Text") ] | Incremental search can make invisible overlays visible temporarily | and/or permanently when a match includes invisible text. To enable | this, the overlay should have a non-`nil' `isearch-open-invisible' | property. The property value should be a function to be called with | the overlay as an argument. This function should make the overlay | visible permanently; it is used when the match overlaps the overlay on | exit from the search. | | During the search, such overlays are made temporarily visible by | temporarily modifying their invisible and intangible properties. If you | want this to be done differently for a certain overlay, give it an | `isearch-open-invisible-temporary' property which is a function. The | function is called with two arguments: the first is the overlay, and | the second is `nil' to make the overlay visible, or `t' to make it | invisible again. `---- That should be pretty trivial to hack into it. Bye, Tassilo