unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Leo Alekseyev <dnquark@gmail.com>
To: Tassilo Horn <tassilo@member.fsf.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Narrow/widen in folding.el
Date: Wed, 22 Dec 2010 04:26:28 -0800	[thread overview]
Message-ID: <AANLkTinBftcfv+n2GT6VYLCHT53EQYm+ZV2Tvqj-qOud@mail.gmail.com> (raw)
In-Reply-To: <87vd2mysrv.fsf@member.fsf.org>

On Wed, Dec 22, 2010 at 3:02 AM, Tassilo Horn <tassilo@member.fsf.org> wrote:
> Leo Alekseyev <dnquark@gmail.com> 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.

Arbitrary folding is handy for headers/footers.  Also, I do a lot of
data analysis in addition to coding, and arbitrary folding can be very
useful there...

> 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.
> `----


In fact, I found the resolution to my original question:
(setq folding-narrow-by-default nil)

I saw this variable before in folding.el's documentation, but I
misunderstood the terminology that was being used ("opening" folds vs
"entering" folds), and didn't realize that the variable controlled
narrowing just like I want it to.  When I went source-browsing
inspired by your message, I realized what it actually did :)

--Leo



  reply	other threads:[~2010-12-22 12:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 21:41 Narrow/widen in folding.el Leo Alekseyev
2010-12-21 17:24 ` Andrea Crotti
2010-12-21 18:42   ` Tassilo Horn
2010-12-21 22:00     ` Andrea Crotti
2010-12-22  8:16       ` Tassilo Horn
2010-12-22  9:01         ` Andrea Crotti
2010-12-22  9:14         ` Leo Alekseyev
2010-12-22 11:02           ` Tassilo Horn
2010-12-22 12:26             ` Leo Alekseyev [this message]
     [not found]         ` <mailman.7.1293008512.15562.help-gnu-emacs@gnu.org>
2010-12-23 23:49           ` Tim X
2010-12-25  2:18     ` Leo Alekseyev
2010-12-25  3:08       ` Leo Alekseyev
2010-12-25  4:45     ` Leo Alekseyev
     [not found]     ` <mailman.9.1293252343.14161.help-gnu-emacs@gnu.org>
2010-12-25 22:48       ` Tim X
2010-12-27  9:19         ` Tassilo Horn
     [not found]         ` <mailman.0.1293441599.18751.help-gnu-emacs@gnu.org>
2010-12-27 22:37           ` Tim X

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinBftcfv+n2GT6VYLCHT53EQYm+ZV2Tvqj-qOud@mail.gmail.com \
    --to=dnquark@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tassilo@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).