bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#11378: 24.1.50; Suggestion: Let M-i in isearch cycle `search-invisib


From: Michael Heerdegen
Subject: bug#11378: 24.1.50; Suggestion: Let M-i in isearch cycle `search-invisible'
Date: Sun, 29 Apr 2012 08:10:33 +0200

Hi,

I want to suggest something like that:

   (defun isearch-cycle-search-invisible ()
     "Cycle the value of `search-invisible'.
   Bound to \\<isearch-mode-map>\\[isearch-cycle-search-invisible] in 
`isearch'."
     (interactive)
     (setq search-invisible
           (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)
     (isearch-update))
   
   (define-key isearch-mode-map [?\M-i]
          'isearch-cycle-search-invisible)

Because like regexp search, word search and case sensitivity,
`search-invisible' is not something a user will set once and forever
in his config - different values are useful in different contexts.

Many users will want to use the default value 'open most of the time,
but the other two possible values are also very useful sometimes,
e.g. to limit searching to visible parts in a folded buffer (headlines
in org, or an outline produced with hideshow-mode etc.).

So, it would be good if the user could change the value of
`search-invisible' as well directly from isearch.


Thanks,

Michael.


In GNU Emacs 24.1.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.1)
 of 2012-04-23 on zelenka, modified by Debian
 (emacs-snapshot package, version 2:20120423-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11104000
Configured using:
 `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp'
 '--without-compress-info' '--with-crt-dir=/usr/lib/i386-linux-gnu/'
 '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes'
 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu'
 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2''





reply via email to

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