From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: query-replace in isearch (was Re: should search ring contain duplicates?) Date: Fri, 12 May 2006 14:14:46 +0300 Organization: JURTA Message-ID: <87y7x75wtp.fsf@jurta.org> References: <200605030727.k437R2Wx009975@amrm2.ics.uci.edu> <87bqufwbls.fsf@jurta.org> <200605031504.k43F49hr001544@scanner2.ics.uci.edu> <87wtcslqoj.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147433107 21735 80.91.229.2 (12 May 2006 11:25:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 May 2006 11:25:07 +0000 (UTC) Cc: dann@ics.uci.edu, storm@cua.dk, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 12 13:25:03 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FeVlU-0004g3-5i for ged-emacs-devel@m.gmane.org; Fri, 12 May 2006 13:25:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeVlT-0008Rb-WC for ged-emacs-devel@m.gmane.org; Fri, 12 May 2006 07:25:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FeVlI-0008R2-Rp for emacs-devel@gnu.org; Fri, 12 May 2006 07:24:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FeVlG-0008Pv-Ff for emacs-devel@gnu.org; Fri, 12 May 2006 07:24:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeVlG-0008Ps-93 for emacs-devel@gnu.org; Fri, 12 May 2006 07:24:46 -0400 Original-Received: from [217.25.160.1] (helo=relay1.binet.com.ua) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FeVmw-0001WJ-Q5; Fri, 12 May 2006 07:26:31 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by relay1.binet.com.ua (Postfix) with ESMTP id 31D6277D38; Fri, 12 May 2006 14:24:42 +0300 (EEST) Original-Received: from mail.binet.com.ua (i27.dialup.binet.com.ua [217.25.161.91]) by relay1.binet.com.ua (Postfix) with ESMTP id 8D9B477C88; Fri, 12 May 2006 14:24:39 +0300 (EEST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Fri, 12 May 2006 00:15:46 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by ClamAv at binet.com.ua X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54314 Archived-At: > The following patch should do that. It also uses `add-to-history' > to add the current search string to `query-replace-from-history-variable' > to improve code in the same function. This requires adding a new > argument KEEP-ALL to `add-to-history'. > > Why do you think it requires that? The old code unconditionally adds a new element to the history list as: ! (set query-replace-from-history-variable ! (cons isearch-string ! (symbol-value query-replace-from-history-variable))) A new argument KEEP-ALL allows to do the same for the new code that uses `add-to-history': ! (add-to-history query-replace-from-history-variable isearch-string nil t) -- Juri Linkov http://www.jurta.org/emacs/