all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* space in multiline interactive search / differences between Emacs 23 and 24
@ 2014-06-25 13:13 David Madore
  2014-06-25 14:08 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: David Madore @ 2014-06-25 13:13 UTC (permalink / raw)
  To: help-gnu-emacs

Dear group,

Suppose I open a file containing exactly two lines as follows:

foo
bar

and I run either an interactive search with C-s foo bar (typing a space
between "foo" and "bar") or else an interactive regexp search with C-M-s
foo bar (still typing a space between "foo" and "bar).

Under Emacs 23 (at least as provided by my Ubuntu 14.04 LTS under the
name emacs23 23.4+1-4.1ubuntu1), the interactive regexp search succeeds
(i.e., the space character matches the ^J line separator) and the simple
(non-regexp) interactive search fails (i.e., the space character does
not match the ^J line separator).  Under Emacs 24 (24.3+1-2ubuntu1),
it's exactly the other way around: the simple search succeeds (=space
matches ^J) and the regexp search does not.

What is the reason for this difference, and why is it exactly opposite
in Emacs 23 and Emacs 24?  (I couldn't find anything in the NEWS file.)
 How can I configure whether space matches ^J in simple versus regexp
interactive search?

(Googling "Emacs multiline interactive search" returns nothing, which I
find strange.)

-- 
     David A. Madore
    (david+news@madore.org,
     http://www.madore.org/~david/ )


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

* Re: space in multiline interactive search / differences between Emacs 23 and 24
  2014-06-25 13:13 space in multiline interactive search / differences between Emacs 23 and 24 David Madore
@ 2014-06-25 14:08 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2014-06-25 14:08 UTC (permalink / raw)
  To: help-gnu-emacs

> From: David Madore <david+news@madore.org>
> Date: Wed, 25 Jun 2014 15:13:57 +0200
> 
> Under Emacs 23 (at least as provided by my Ubuntu 14.04 LTS under the
> name emacs23 23.4+1-4.1ubuntu1), the interactive regexp search succeeds
> (i.e., the space character matches the ^J line separator) and the simple
> (non-regexp) interactive search fails (i.e., the space character does
> not match the ^J line separator).  Under Emacs 24 (24.3+1-2ubuntu1),
> it's exactly the other way around: the simple search succeeds (=space
> matches ^J) and the regexp search does not.
> 
> What is the reason for this difference, and why is it exactly opposite
> in Emacs 23 and Emacs 24?  (I couldn't find anything in the NEWS file.)
>  How can I configure whether space matches ^J in simple versus regexp
> interactive search?

From NEWS, under "Editing Changes in Emacs 24.3":

   ** Search and Replace

   *** Non-regexp Isearch now performs "lax" space matching.
   Each sequence of spaces in the supplied search string may match any
   sequence of one or more whitespace characters, as specified by the
   variable `search-whitespace-regexp'.  (This variable is also used by a
   similar existing feature for regexp Isearch.)

   *** New Isearch command `M-s SPC' toggles lax space matching.
   This applies to both ordinary and regexp Isearch.

   *** New option `replace-lax-whitespace'.
   If non-nil, `query-replace' uses flexible whitespace matching too.
   The default is nil.




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

end of thread, other threads:[~2014-06-25 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 13:13 space in multiline interactive search / differences between Emacs 23 and 24 David Madore
2014-06-25 14:08 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.