From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Teach isearch to open invisible only if visible search failed?
Date: Sun, 05 Dec 2010 08:32:57 +0100 [thread overview]
Message-ID: <87ipz8ad3q.fsf@tux.homenetwork> (raw)
In-Reply-To: m1oc90bu1n.fsf@cam.ac.uk
Hi Leo,
Leo <sdl.web@gmail.com> writes:
> Hello all Emacsen,
>
> I use C-s/r for navigating around text a lot and I have found it slows
> me down in large text shown in outline structure in outline or org mode
> etc. So I wonder how to set up isearch so that it only opens invisible
> text when search in the visible fails.
I have no setting for isearch as i don't use it or really few (i use
only ioccur) but why not always opening all headers with `show-all' like
ioccur does?
> My attempt is like this but it doesn't work as smoothly as I'd like.
>
> (setq search-invisible nil)
> (add-hook 'isearch-update-post-hook
> (lambda () (when (and (or (not isearch-success)
> isearch-error)
> ;; prevent infinite loop
> (not (eq search-invisible 'open)))
> (setq search-invisible 'open)
> (isearch-search)
> (isearch-update))))
> (add-hook 'isearch-mode-end-hook
> (lambda () (setq search-invisible nil)))
>
> I wonder if someone familiar with isearch can propose a better setup.
> Thanks in advance.
>
> Leo
>
>
>
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
next prev parent reply other threads:[~2010-12-05 7:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-05 6:41 Teach isearch to open invisible only if visible search failed? Leo
2010-12-05 6:52 ` Suvayu Ali
2010-12-05 7:01 ` Leo
2010-12-05 7:32 ` Thierry Volpiatto [this message]
2010-12-05 7:43 ` Leo
2010-12-05 11:52 ` Thien-Thi Nguyen
2010-12-05 12:45 ` Leo
2010-12-05 15:19 ` Drew Adams
2010-12-05 17:29 ` Leo
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=87ipz8ad3q.fsf@tux.homenetwork \
--to=thierry.volpiatto@gmail.com \
--cc=help-gnu-emacs@gnu.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).