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

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

bug#13480: 24.3.50; `C-w' from Isearch should translate newlines to spac


From: Dani Moncayo
Subject: bug#13480: 24.3.50; `C-w' from Isearch should translate newlines to spaces
Date: Sat, 3 Aug 2013 19:09:49 +0200

On Thu, Jan 17, 2013 at 9:39 PM, Dani Moncayo <dmoncayo@gmail.com> wrote:
> Hello,
>
> I have `isearch-lax-whitespace' set to t in my init file, so that I
> can search for a sequence of words regardless of whether there is line
> breaks or plain spaces between them.
>
> Now, if the text following point is "foo bar" and I do `C-s C-w C-w'
> I'll be searching for any sequence of those two words, separated by
> any whitespace (well, controlled by `search-whitespace-regexp').  Ok,
> as expected.
>
> But I've just noticed that if the text following point is
> "foo<newline>bar" and I do the same, I'll be searching exactly for
> that fixed sequence of 7 characters, including the <newline>.  Not
> what I want, obviously.

There were quite a few post about this problem, but at the end, I
think that the right solution is this one:

When `isearch-lax-whitespace' is non-nil, a sequence of whitespace
chars in the search string (not only a space, as stated now) should
match a sequence of whitespace chars in the buffer.

Analogous reasoning for `isearch-regexp-lax-whitespace' (for regexp
incremental search).

(Remember: we must refrain from modifying the text to search for, as
supplied by the user, because the search conditions (lax whitespace
matching in this case) may vary during the Isearch session)

-- 
Dani Moncayo





reply via email to

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