[Top][All Lists]

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

Re: Copy/iSearch/Occur on folded outline view?

From: Michael Heerdegen
Subject: Re: Copy/iSearch/Occur on folded outline view?
Date: Tue, 05 Feb 2013 21:17:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux)

Thorsten Jolitz <> writes:

> > For isearch, you have `search-invisible':
> > HTH,
> yes, thanks for the tip.

You may also consider to define an toggle command for
`search-invisible', and bind it in `isearch-mode-map', like this

--8<---------------cut here---------------start------------->8---
(require 'cl-lib)

(defun isearch-cycle-search-invisible ()
  "Cycle the value of `search-invisible'.
Bound to \\<isearch-mode-map>\\[isearch-cycle-search-invisible] in `iseach'."
  (setq search-invisible
        (cl-case search-invisible
          ((nil) t)
          ((t)   'open)
          (else  nil)))
  (message "search-invisible: %s" search-invisible)
  (sit-for 1.)
  (setq isearch-success t isearch-adjusted t)

 (lambda ()
   (make-variable-buffer-local #'search-invisible)
   (define-key isearch-mode-map [(meta ?i)] #'isearch-cycle-search-invisible)))
--8<---------------cut here---------------end--------------->8---

This let's you cycle `search-invisible' while isearching with M-i.



reply via email to

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