From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Roehler Newsgroups: gmane.emacs.help Subject: Re: query-replace-regexp-yank Date: Mon, 15 Jan 2007 20:42:40 +0100 Message-ID: <45ABD930.5080908@easy-emacs.de> References: <45AB461D.1070303@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168891743 22283 80.91.229.12 (15 Jan 2007 20:09:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2007 20:09:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 15 21:09:00 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H6XbS-0005Hv-I0 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 20:34:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6XbR-0003Pl-Fb for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 14:34:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H6XbA-0003Ms-AQ for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 14:34:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H6Xb8-0003Lg-76 for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 14:34:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6Xb7-0003LU-DV for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 14:34:25 -0500 Original-Received: from [212.227.126.188] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H6Xb5-0001KY-Ui for help-gnu-emacs@gnu.org; Mon, 15 Jan 2007 14:34:24 -0500 Original-Received: from [84.190.194.142] (helo=[192.168.178.25]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis), id 0MKwtQ-1H6Xb30Edj-0003Er; Mon, 15 Jan 2007 20:34:21 +0100 User-Agent: Thunderbird 1.5.0.4 (X11/20060516) Original-To: help-gnu-emacs@gnu.org In-Reply-To: <45AB461D.1070303@easy-emacs.de> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:62d13292e0fce6aaed56aaadcb96352d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40326 Archived-At: > > At the moment I use `isearch-yank-kill' to insert > regexps into the `query-replace-regexp' minibuffer to > have them quoted as necessary. It seems `query-replace-regexp' handles termes with backslashes now not due `isearch-yank-kill' but as a result of an `regexp-quote' inserted into `query-replace-read-from' - see the diff below. As an uncomfortable side-effect, however, terms delivered by `query-replace-history' in a following query are quoted again and again, are no longer usable. So this isn't a solution still. diff -bc --suppress-common-lines /usr/local/share/emacs/22.0.92/lisp/replace.el replace.el *** /usr/local/share/emacs/22.0.92/lisp/replace.el 2007-01-15 11:36:52.000000000 +0100 --- replace.el 2007-01-15 16:26:25.000000000 +0100 *************** *** 101,110 **** (car (if regexp-flag regexp-search-ring search-ring)) (let* ((history-add-new-input nil) (from - ;; The save-excursion here is in case the user marks and copies - ;; a region in order to specify the minibuffer input. - ;; That should not clobber the region for the query-replace itself. (save-excursion (read-from-minibuffer (if query-replace-defaults (format "%s (default %s -> %s): " prompt --- 101,110 ---- (car (if regexp-flag regexp-search-ring search-ring)) (let* ((history-add-new-input nil) (from (save-excursion + ;; 2007-01-15 a.roehler@web.de changed section start + (regexp-quote + ;; 2007-01-15 a.roehler@web.de changed section end (read-from-minibuffer (if query-replace-defaults (format "%s (default %s -> %s): " prompt *************** *** 114,119 **** --- 114,122 ---- nil nil nil query-replace-from-history-variable nil t)))) + ;; 2007-01-15 a.roehler@web.de changed section start + ) + ;; 2007-01-15 a.roehler@web.de changed section end (if (and (zerop (length from)) query-replace-defaults) (cons (car query-replace-defaults) (query-replace-compile-replacement __ Andreas Roehler