From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: isearch-yank-char Date: Fri, 30 Apr 2004 08:31:32 +0000 (GMT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87n04u77z8.fsf@floss.red-bean.com> Reply-To: Alan Mackenzie NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1083317171 6183 80.91.224.253 (30 Apr 2004 09:26:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Apr 2004 09:26:11 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 30 11:26:01 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BJUHR-0007mn-00 for ; Fri, 30 Apr 2004 11:26:01 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BJUHR-0008L2-00 for ; Fri, 30 Apr 2004 11:26:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BJTjQ-0000iU-QB for emacs-devel@quimby.gnus.org; Fri, 30 Apr 2004 04:50:52 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BJTiu-0000fE-GT for emacs-devel@gnu.org; Fri, 30 Apr 2004 04:50:20 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BJTXL-0005tB-D7 for emacs-devel@gnu.org; Fri, 30 Apr 2004 04:38:55 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1BJTXK-0005sa-0D for emacs-devel@gnu.org; Fri, 30 Apr 2004 04:38:22 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by mx20.gnu.org with esmtp (Exim 4.30) id 1BJTPY-0003SD-T9 for emacs-devel@gnu.org; Fri, 30 Apr 2004 04:30:21 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id IAA00578; Fri, 30 Apr 2004 08:31:34 GMT X-Sender: root@acm.acm Original-To: Karl Fogel In-Reply-To: <87n04u77z8.fsf@floss.red-bean.com> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22417 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22417 On 29 Apr 2004, Karl Fogel wrote: >This thread hasn't actually arrived at a decision yet; let's see if we >can reach one. Proposal: > 1. Bind C-f in isearch-mode to 'isearch-yank-char'. > (And while we're at it, fix isearch-yank-char's doc string to > say "char" instead of "letter".) Excellent idea! Let's do it! > 2. Bind C-b in isearch-mode to a function (name TBD) that loses > one char from the search string. NOT SO FAST! Tell me, where does point get left after a C-b? Normally, one character backwards. No problem. But.... Where does point get left in a regexp-search after C-b? Suppose that the last character entered into the regexp search string was a closing parenthesis (or whatever) that caused the the regexp search to backtrack, moving point to an earlier position? I can think of several ideas for handling this, e.g.: (i) Point moves _forward_ to where it was before the ] was entered, i.e. C-b works just like in this case; However, the search string might just have been extended by several characters at once (with M-y). This looks like getting hairy; (ii) C-b only works in normal (non-regexp) search; (iii) C-b is disallowed in regexp-search for quirky characters like ); (iv) C-b is disallowed in regexp-search whenever it would cause point to jump forward; (v) Point is left where it was, and the currently highlighted "match" is no longer a match at all; (vi) C-b in such circumstances acts like M-e, leaving the user directly editing the search string. I think it would be a good idea to resolve this issue before implementing a C-b. I'm not sure whether I'd rather do without C-b here than have some ugly inconsistency, even if that inconsistency only appears in marginal circumstances. >Retreats into the night, watching, waiting,... >-Karl -- Alan Mackenzie (Munich, Germany)