unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Possible misleading example in `Incremental Search' Info node
@ 2016-08-04 12:25 Udyant Wig
  2016-08-04 13:56 ` Emanuel Berg
  2016-08-04 14:21 ` Drew Adams
  0 siblings, 2 replies; 4+ messages in thread
From: Udyant Wig @ 2016-08-04 12:25 UTC (permalink / raw)
  To: help-gnu-emacs

I was reading the _Incremental_Search_ Info node in the Emacs manual.
In "15.1.4 Special Input for Incremental Search", found via

    (info "(emacs)Special Isearch")

the second paragraph discusses "lax space matching", and its second and
third sentences read as follows in my version of Emacs:

    Hence, ‘foo bar’ matches ‘foo bar’, ‘foo bar’, ‘foo bar’, and so on
    (but not ‘foobar’).  More precisely, Emacs matches each sequence of
    space characters in the search string to a regular expression
    specified by the variable ‘search-whitespace-regexp’.

I have not modified the default value for `search-whitespace-regexp',
which, for me, is

    search-whitespace-regexp
    => "\\s-+"

From my understanding of that full paragraph, the following illustrates
the default behaviour.  Suppose that we have the text

foobar
foo bar
foo  bar
foo   bar

If point is at the first `f' of `foobar', and I start an incremental
search via C-s for `foo bar', then all three of `foo bar', `foo  bar',
and `foo   bar' are highlighted, the latter two using the
`lazy-highlight' face.

Were the three instances of `foo bar' in the Info node paragraph meant
to have an increasing number of spaces?  Does anyone else see this?

My Emacs version is:

(emacs-version)
=> "GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
    of 2015-03-08 on trouble, modified by Debian"

-- 
Udyant Wig


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-04 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04 12:25 Possible misleading example in `Incremental Search' Info node Udyant Wig
2016-08-04 13:56 ` Emanuel Berg
2016-08-04 14:21 ` Drew Adams
2016-08-04 15:01   ` Eli Zaretskii

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