GNU bug report logs -
#13480
24.3.50; `C-w' from Isearch should translate newlines to spaces
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Thu, 17 Jan 2013 20:41:02 UTC
Severity: normal
Tags: moreinfo
Found in version 24.3.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 13480 <at> debbugs.gnu.org (full text, mbox):
> Wait a moment. On second thought, I think that no translation should
> be necessary at all when adding text from somewhere to the search string.
Why not? If you save "foo<newline>bar" to the kill-ring and
yank it to the search string with `C-y' (`isearch-yank-kill')
wouldn't you want it to translate the <newline> into a space?
Anyway if you want to try this possibility (maybe it should be optional?),
here is the patch:
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2013-01-18 21:36:55 +0000
+++ lisp/isearch.el 2013-01-18 21:57:06 +0000
@@ -1780,6 +1780,13 @@ (defun isearch-yank-string (string)
(if (and isearch-case-fold-search
(eq 'not-yanks search-upper-case))
(setq string (downcase string)))
+ (if (if isearch-regexp
+ isearch-regexp-lax-whitespace
+ isearch-lax-whitespace)
+ (setq string (replace-regexp-in-string
+ search-whitespace-regexp
+ " "
+ string nil t)))
(if isearch-regexp (setq string (regexp-quote string)))
;; Don't move cursor in reverse search.
(setq isearch-yank-flag t)
This bug report was last modified 3 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.