From 2501c91259584d30e0cbb3a5be143b60b1204f73 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 28 Feb 2014 18:48:54 -0800 Subject: [PATCH] Some doc related to search-invisible and query replace * doc/emacs/search.texi (Query Replace): Mention search-invisible. * doc/emacs/text.texi (Outline Visibility): Mention search-invisible also affects query-replace. * lisp/isearch.el (search-invisible): Doc fix. * etc/NEWS: Related markup. --- doc/emacs/ChangeLog | 9 ++++++++- doc/emacs/search.texi | 4 ++++ doc/emacs/text.texi | 7 ++++--- etc/NEWS | 1 + lisp/ChangeLog | 2 ++ lisp/isearch.el | 2 +- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 39c37c4802..a99ff76ccb 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,10 +1,17 @@ +2014-03-01 Glenn Morris + + * search.texi (Query Replace): Mention search-invisible. + * text.texi (Outline Visibility): Mention search-invisible + also affects query-replace. + 2014-02-28 Xue Fuqiao * emacs.texi (Top): * programs.texi (Programs, Prettifying Symbols): Document `prettify-symbols-mode' and `global-prettify-symbols-mode'. - * misc.texi (Saving Emacs Sessions): Document some new desktop user options. + * misc.texi (Saving Emacs Sessions): + Document some new desktop user options. 2014-02-27 Xue Fuqiao diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 6fa9a33692..99a0531389 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1393,6 +1393,10 @@ line. used the minibuffer to read its arguments. @xref{Repetition, C-x ESC ESC}. +@cindex invisible text, and query-replace + The option @code{search-invisible} determines how @code{query-replace} +treats invisible text. @xref{Outline Search}. + @xref{Operating on Files}, for the Dired @kbd{Q} command which performs query replace on selected files. See also @ref{Transforming File Names}, for Dired commands to rename, copy, or link files by diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 68523888f6..9eb8f46788 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -1132,9 +1132,10 @@ it makes that part of the buffer visible. If you exit the search at that position, the text remains visible. To toggle whether or not an active incremental search can match hidden text, type @kbd{M-s i}. To change the default for future searches, customize the option -@code{search-invisible}. You can also automatically make text visible -as you navigate in it by using Reveal mode (@kbd{M-x reveal-mode}), a -buffer-local minor mode. +@code{search-invisible}. (This option also affects how @code{query-replace} +and related functions treat hidden text, @pxref{Query Replace}.) +You can also automatically make text visible as you navigate in it by +using Reveal mode (@kbd{M-x reveal-mode}), a buffer-local minor mode. @node Outline Views @subsection Viewing One Outline in Multiple Views diff --git a/etc/NEWS b/etc/NEWS index 19078ed828..9e803f6604 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -851,6 +851,7 @@ and adds it to the search string. +++ *** `M-s i' in Isearch mode toggles whether search matches invisible text. ++++ *** `query-replace' skips invisible text when `search-invisible' is nil, and opens overlays with hidden text when `search-invisible' is `open'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2da420c001..82157a4520 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2014-03-01 Glenn Morris + * isearch.el (search-invisible): Doc fix. + * minibuffer.el (completion-hilit-commonality): Make `base-size' argument optional. Short-cut if `prefix-len' is 0. * comint.el (comint-dynamic-list-completions): Doc fix. diff --git a/lisp/isearch.el b/lisp/isearch.el index a158c96c06..20dabdc5b6 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -131,7 +131,7 @@ a tab, a carriage return (control-M), a newline, and `]+'." :version "24.3") (defcustom search-invisible 'open - "If t incremental search can match hidden text. + "If t incremental search/query-replace can match hidden text. A nil value means don't match invisible text. When the value is `open', if the text matched is made invisible by an overlay having an `invisible' property and that overlay has a property -- 2.20.1