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: History for query replace pairs Date: Tue, 07 Oct 2014 01:35:30 +0300 Organization: JURTA Message-ID: <87ppe4zv0t.fsf@mail.jurta.org> References: <87a97ejxuo.fsf@mail.jurta.org> <87lhovik5c.fsf@lifelogs.com> <87wq8egh3r.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412635091 30980 80.91.229.3 (6 Oct 2014 22:38:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Oct 2014 22:38:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 07 00:38:04 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XbGup-0003oq-Fl for ged-emacs-devel@m.gmane.org; Tue, 07 Oct 2014 00:38:03 +0200 Original-Received: from localhost ([::1]:54926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbGup-0007eJ-3O for ged-emacs-devel@m.gmane.org; Mon, 06 Oct 2014 18:38:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbGuU-0007dE-NU for emacs-devel@gnu.org; Mon, 06 Oct 2014 18:37:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbGuL-0003L0-G8 for emacs-devel@gnu.org; Mon, 06 Oct 2014 18:37:42 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.222.226]:50251 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbGuL-0003Ke-AS for emacs-devel@gnu.org; Mon, 06 Oct 2014 18:37:33 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 740FD310116AD6 for ; Mon, 6 Oct 2014 15:37:30 -0700 (PDT) In-Reply-To: <87wq8egh3r.fsf@lifelogs.com> (Ted Zlatanov's message of "Sun, 05 Oct 2014 20:46:32 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 69.163.222.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175054 Archived-At: > That sounds fine, especially if it can be implemented quickly. Otherwise > maybe we should adopt Tom's code now and improve it later. What do you > think? I'll hold off until you and Tom have given your opinions. > > Either way, I am excited about this. It will definitely improve the UI > experience! Since it's important to keep backward compatibility we have not much options. Presenting the two-field minibuffer initially or after typing M-p might break some existing code that relies on two functions query-replace-read-from and query-replace-read-to used to read FROM and TO args separately. This leaves us with the remaining option to keep current UI mostly unchanged but improve it to make it easier to repeat previous replacements. It's possible to do this with just two RET keystrokes, e.g. `M-% M-p M-p M-p ... RET RET' where any number of M-p will browse FROM parts (paired with the TO part), after the first RET query-replace-read-to will be called where the TO part (corresponding to the selected previous FROM) will be inserted into the minibuffer as initial input. Then second RET will accept it by default. So the first RET will actually do almost the same as TAB would do in the two-field minibuffer to switch to editing the TO part.