From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: be able to replace during isearch Date: Sun, 1 Jul 2007 15:37:38 -0700 Message-ID: References: <878x9zhl12.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1183329521 25009 80.91.229.12 (1 Jul 2007 22:38:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2007 22:38:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Juri Linkov" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 02 00:38:39 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I583w-0002ur-Am for ged-emacs-devel@m.gmane.org; Mon, 02 Jul 2007 00:38:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I583v-0008WC-Cq for ged-emacs-devel@m.gmane.org; Sun, 01 Jul 2007 18:38:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I583q-0008RW-RI for emacs-devel@gnu.org; Sun, 01 Jul 2007 18:38:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I583q-0008QO-4i for emacs-devel@gnu.org; Sun, 01 Jul 2007 18:38:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I583q-0008Q8-14 for emacs-devel@gnu.org; Sun, 01 Jul 2007 18:38:30 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I583p-0006aj-K9 for emacs-devel@gnu.org; Sun, 01 Jul 2007 18:38:29 -0400 Original-Received: from rgmgw3.us.oracle.com (rgmgw3.us.oracle.com [138.1.186.112]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l61McQRL019407; Sun, 1 Jul 2007 16:38:26 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw3.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l61LdxAK017514; Sun, 1 Jul 2007 16:38:26 -0600 Original-Received: from dhcp-amer-csvpn-gw1-141-144-64-217.vpn.oracle.com by acsmt351.oracle.com with ESMTP id 3004423711183329468; Sun, 01 Jul 2007 15:37:48 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <878x9zhl12.fsf@jurta.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: Linux 2.4-2.6 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:74163 Archived-At: > > The idea is that you would not need to leave isearch to perform > > replacements. Whenever you wanted to replace the current search > > occurrence, you would hit a certain key. The first time you do > > this, you would be asked for the replacement string. > > I imagine this could be like typing `R' during ispell-checking. Dunno, I've never used that. The Emacs manual, however, says this: `R NEW ' Replace the word with NEW, and do a `query-replace' so you can replace it elsewhere in the buffer if you wish. (The replacements will be rescanned for more spelling errors.) If `R' does indeed activate `query-replace', then no, what I propose is very different. In my proposal, you never enter `query-replace', and you never leave isearch. There are simply two additional isearch key bindings, one to prompt for and read a replacement string (expression) and the other to replace the current search hit with that replacement. In Icicles, these two keys are `M-,' and `C-S-RET' (or `C-S-mouse-2' or `C-S-next' etc., depending on what you want done after the replacement), but in isearch they should be something more appropriate for isearch. In my proposal, you are never queried to replace anything. Instead, you replace a search hit only upon demand, by hitting the replace key (e.g. `C-S-RET'). If you never hit that key, then there is no replacement. There is never any querying for replacement. You only use the `M-,' (or equivalent) binding if you want to change the current replacement string during the same invocation of isearch. The first time you hit the replace key (e.g. `C-S-RET'), there is an implicit call to `M-,' to read the replacement string. You can think of the correspondence to `query-replace' this way: * Instead of `query-replace' automatically moving to the next match, you must hit `C-s'. * Instead of hitting `y' or `n', you hit the replace key (e.g. `C-S-RET') or you do nothing (for `n').