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: Fri, 18 Jan 2013 00:10:01 +0100

>> So I propose that the command `isearch-yank-word-or-char' (C-w in
>> Isearch) DTRT in this case, i.e., when `search-whitespace-regexp' is
>> non-nil, translate the <newline> into a simple space when pulling text
>> from the buffer into the search string.
>
> It makes sense to translate the <newline> into a simple space
> only when `search-whitespace-regexp' contains <newline>
> such as e.g. (setq search-whitespace-regexp "\\(\\s-\\|\n\\)+")
> Otherwise, the translated space won't match <newline>.
> It is possible to do this with the patch below.

Indeed.  Any character that matches the current value of
`search-whitespace-regexp' should be translated to a single space.

> But then you might also want to translate the <newline> into a space
> in `isearch-yank-line' as well?  And maybe also in `isearch-yank-kill'?

I think so.  And also `isearch-yank-char' and `isearch-yank-pop'. In
general, any command that pulls text from somewhere into the search string.

IMO that's what makes sense when `isearch-lax-whitespace' is non-nil.

And BTW, I think that an analogous change should be done to regexp Isearch,
i.e., perform that translations during regexp Isearch when
`isearch-regexp-lax-whitespace' is non-nil.

-- 
Dani Moncayo





reply via email to

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