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: Re: replace history Date: Thu, 03 Jan 2008 23:46:42 +0200 Organization: JURTA Message-ID: <87abnm8w05.fsf@jurta.org> References: <871w97x5yc.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199397012 22505 80.91.229.12 (3 Jan 2008 21:50:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2008 21:50:12 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, rrt@sc3d.org To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 03 22:50:31 2008 Return-path: Envelope-to: geb-bug-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 1JAXxP-0002aV-2g for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Jan 2008 22:50:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JAXx2-0002lr-SB for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Jan 2008 16:50:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JAXwK-0001wJ-Th for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2008 16:49:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JAXwJ-0001tI-2l for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2008 16:49:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JAXwI-0001t1-TY for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2008 16:49:22 -0500 Original-Received: from relay03.kiev.sovam.com ([62.64.120.201]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JAXwF-0000Hn-2M; Thu, 03 Jan 2008 16:49:19 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JAXw4-0009cz-TM; Thu, 03 Jan 2008 23:49:17 +0200 In-Reply-To: (Richard Stallman's message of "Fri, 28 Dec 2007 08:55:20 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-Scanner-Signature: 8abf2c83e696415c40c55866f9369f42 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 1976 [Dec 29 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Info: {TO: local part of email appears in body} X-SpamTest-Method: none X-SpamTest-Rate: 28 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17294 Archived-At: > > In Emacs 22 it's great the way that you are given the last search/replace > > pair as a default for query-replace, but is there a way to get a history > > of pairs rather than alternating search item/replace item? > > One way to implement this feature is to use one input string with the > ed-like syntax "s/regex/substitution/g". > > I don't think this really does the job. It is a separate command > that you have to use INSTEAD of query-replace. > > What's requested is a way to move thru the history of recent > query-replace argument pairs. One way to move thru the history of recent pairs is to put all pairs to the default list of M-%. Every pair needs to be in the same format as currently used to display the default value in its prompt - with an arrow separating the FROM and TO arguments like "from1 -> to1". This has a drawback that after typing RET with a string in this format, query-replace needs to parse it, and separately add FROM and TO to the history lists. -- Juri Linkov http://www.jurta.org/emacs/