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#10885: Replace expressions: enhance functionality when searching in filled paragraphs Date: Mon, 27 Feb 2012 12:58:22 +0200 Organization: JURTA Message-ID: <87ehtg4ic1.fsf@mail.jurta.org> References: <33392837.post@talk.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1330343189 26079 80.91.229.3 (27 Feb 2012 11:46:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 11:46:29 +0000 (UTC) Cc: 10885@debbugs.gnu.org, linuxfever To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 27 12:46:28 2012 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 1S1z2B-0000pw-RH for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2012 12:46:27 +0100 Original-Received: from localhost ([::1]:44940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1z2B-0001Qq-FQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2012 06:46:27 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1z25-0001MM-Fq for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 06:46:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1z1v-0003Fm-TL for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 06:46:21 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1z1v-0003Fb-QX for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 06:46:11 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S1z4f-0001lw-N8 for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 06:49: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: Mon, 27 Feb 2012 11:49:01 +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: Original-Received: via spool by 10885-submit@debbugs.gnu.org id=B10885.13303432906748 (code B ref 10885); Mon, 27 Feb 2012 11:49:01 +0000 Original-Received: (at 10885) by debbugs.gnu.org; 27 Feb 2012 11:48:10 +0000 Original-Received: from localhost ([127.0.0.1]:59136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1z3n-0001kh-5d for submit@debbugs.gnu.org; Mon, 27 Feb 2012 06:48:09 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:53386 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1z3j-0001kT-7b for 10885@debbugs.gnu.org; Mon, 27 Feb 2012 06:48:04 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 5A1FC451C0B9; Mon, 27 Feb 2012 03:43:31 -0800 (PST) In-Reply-To: (Dani Moncayo's message of "Sun, 26 Feb 2012 11:17:09 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (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 (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:57295 Archived-At: >> In a nutshell, I believe enhancing the functionality of the replacement >> functions to accommodate for expressions split in two lines, would make >> their usability so much easier. > > Adding a "word-type mode" to query-replace (analogous of the word-type > mode of Isearch) would do what you want, and would be a good feature, > IMO. > > That is: add an option to query-replace whereby the matches are found > using a word-type search, instead of the (default) normal search. There exists already a "word query-replace mode" with `C-u M-%', but currently it is very limited. To bring it in sync with the "word search" is possible with this patch (for 24.2): === modified file 'lisp/replace.el' --- lisp/replace.el 2012-02-24 22:46:57 +0000 +++ lisp/replace.el 2012-02-27 10:55:04 +0000 @@ -1813,10 +1813,7 @@ (defun perform-replace (from-string repl (if delimited-flag (setq search-function 're-search-forward - search-string (concat "\\b" - (if regexp-flag from-string - (regexp-quote from-string)) - "\\b"))) + search-string (word-search-regexp from-string))) (when query-replace-lazy-highlight (setq isearch-lazy-highlight-last-string nil))