From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#13480: 24.3.50; `C-w' from Isearch should translate newlines to spaces Date: Fri, 18 Jan 2013 23:59:31 +0200 Organization: JURTA Message-ID: <87wqva2lvg.fsf@mail.jurta.org> References: <87r4ljh54a.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358546842 5196 80.91.229.3 (18 Jan 2013 22:07:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jan 2013 22:07:22 +0000 (UTC) Cc: 13480@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 18 23:07:38 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TwK63-0005sd-OT for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jan 2013 23:07:35 +0100 Original-Received: from localhost ([::1]:38022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwK5m-0000Uo-I8 for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jan 2013 17:07:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwK5j-0000Uf-9o for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 17:07:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwK5h-00015t-WF for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 17:07:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwK5h-00015f-T5 for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 17:07:13 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TwK6T-00084l-Nw for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 17:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Jan 2013 22:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13480-submit@debbugs.gnu.org id=B13480.135854686531013 (code B ref 13480); Fri, 18 Jan 2013 22:08:01 +0000 Original-Received: (at 13480) by debbugs.gnu.org; 18 Jan 2013 22:07:45 +0000 Original-Received: from localhost ([127.0.0.1]:39183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwK6B-000849-TR for submit@debbugs.gnu.org; Fri, 18 Jan 2013 17:07:44 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:41719 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwK65-00083n-6V for 13480@debbugs.gnu.org; Fri, 18 Jan 2013 17:07:41 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 8420F2019B9166; Fri, 18 Jan 2013 14:06:47 -0800 (PST) In-Reply-To: (Dani Moncayo's message of "Fri, 18 Jan 2013 00:54:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69999 Archived-At: > 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 "foobar" 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 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)