From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: bug#10885: Replace expressions: enhance functionality when searching in filled paragraphs Date: Sun, 26 Feb 2012 00:16:36 -0700 Message-ID: References: <33392837.post@talk.nabble.com> <1oipiuxspa.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1330240599 932 80.91.229.3 (26 Feb 2012 07:16:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Feb 2012 07:16:39 +0000 (UTC) To: 10885@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 26 08:16:38 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S1YLV-0000Mo-8c for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Feb 2012 08:16:37 +0100 Original-Received: from localhost ([::1]:52665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1YLU-0004rc-M6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Feb 2012 02:16:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1YLK-0004rV-Pq for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2012 02:16:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1YLC-0001fC-PT for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2012 02:16:26 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1YLC-0001f8-Lk for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2012 02:16:18 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S1YNq-0007CA-7L for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2012 02:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Rodgers Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Feb 2012 07:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.133024071127615 (code B ref -1); Sun, 26 Feb 2012 07:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Feb 2012 07:18:31 +0000 Original-Received: from localhost ([127.0.0.1]:56648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1YNL-0007BM-8j for submit@debbugs.gnu.org; Sun, 26 Feb 2012 02:18:31 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60439) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1YNJ-0007BE-Jr for submit@debbugs.gnu.org; Sun, 26 Feb 2012 02:18:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1YKY-0001cf-1m for submit@debbugs.gnu.org; Sun, 26 Feb 2012 02:15:45 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:38882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1YKX-0001cQ-U9 for submit@debbugs.gnu.org; Sun, 26 Feb 2012 02:15:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1YKQ-0004ll-VE for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2012 02:15:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1YKH-0001ai-Ry for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2012 02:15:30 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:33331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1YKH-0001aV-Ld for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2012 02:15:21 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S1YKF-00084C-DA for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2012 08:15:19 +0100 Original-Received: from c-71-237-25-24.hsd1.co.comcast.net ([71.237.25.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Feb 2012 08:15:19 +0100 Original-Received: from kevin.d.rodgers by c-71-237-25-24.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Feb 2012 08:15:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-25-24.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19 In-Reply-To: <1oipiuxspa.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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 (newer, 2) 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:57247 Archived-At: On 2/25/12 6:57 PM, Glenn Morris wrote: > linuxfever wrote: > >> Currently it seems that when trying to replace an expression comprising two >> words, say for example 'replace this', then the functions 'replace-string' >> or 'replace-regexp' fail to locate the expression when that is split along >> two lines in the text, i.e., in the above example when the word 'replace' is >> at the end of one line, and the word 'this' is at the beginning of the next >> one. > > You can use query-replace-regexp for this. > > Sample input: > > This is text. This is text. This is text. This is text. Replace this. > This is text. This is text. This is text. This is text. This is text. Replace > this. > Replace this. > > M-x query-replace-regexp RET \(replace\)\([ ^I^J]*\)\(this\) RET Done\2that RET > > Output: > > This is text. This is text. This is text. This is text. Done that. > This is text. This is text. This is text. This is text. This is text. Done > that. > Done that. Would it make sense for replace-regexp/query-replace-regexp (and other commands that read regexps from the user) to respect search-whitespace-regexp, just like isearch? -- Kevin Rodgers Denver, Colorado, USA