From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: isearch-yank-char Date: Sun, 02 May 2004 14:32:32 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87vfjfjc8f.fsf@mail.jurta.org> References: <874qr7l59b.fsf@mail.jurta.org> <20040426230345.GA8594@fencepost> <877jw2cq4f.fsf@floss.red-bean.com> <87ad0xvo33.fsf@mail.jurta.org> <871xm8wv6j.fsf@mail.jurta.org> <87n04u77z8.fsf@floss.red-bean.com> <87k6zygjff.fsf@mail.jurta.org> <8765bi75vp.fsf@floss.red-bean.com> <87hdv1c1lm.fsf@mail.jurta.org> <87y8od60if.fsf@floss.red-bean.com> <87zn8t6v8z.fsf@mail.jurta.org> <87hdv15q09.fsf@floss.red-bean.com> <87u0z1xasi.fsf@mail.jurta.org> <874qr15m5a.fsf@floss.red-bean.com> <87zn8snazi.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083498447 14441 80.91.224.253 (2 May 2004 11:47:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 May 2004 11:47:27 +0000 (UTC) Cc: kfogel@red-bean.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 02 13:47:18 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 1BKFRG-0000YY-00 for ; Sun, 02 May 2004 13:47:18 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKFRF-0007rx-00 for ; Sun, 02 May 2004 13:47:18 +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 1BKFPH-0001fi-NQ for emacs-devel@quimby.gnus.org; Sun, 02 May 2004 07:45:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BKFJ5-0000p5-FF for emacs-devel@gnu.org; Sun, 02 May 2004 07:38:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BKFHW-0007jm-56 for emacs-devel@gnu.org; Sun, 02 May 2004 07:37:46 -0400 Original-Received: from [66.33.219.6] (helo=knife.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BKFGP-00078A-1G for emacs-devel@gnu.org; Sun, 02 May 2004 07:36:05 -0400 Original-Received: from mail.jurta.org (80-235-32-164-dsl.mus.estpak.ee [80.235.32.164]) by knife.dreamhost.com (Postfix) with ESMTP id CE5D1E40B0; Sun, 2 May 2004 04:36:01 -0700 (PDT) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "01 May 2004 22:02:20 +0200") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) 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:22529 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22529 storm@cua.dk (Kim F. Storm) writes: > isearch-yank-word-or-char does a better job than isearch-yank-word > in cases like the following [] is the cursor location: > > fun1((abc-def-ghi[])); > fun2(xyz); > > But I'm obviously biased here (as the one who suggested the new C-w > binding :-) The main inconvenience of isearch-yank-word-or-char is that its advancing isearch point is too slow when the user wants to move the point by words (where the "word" has the same meaning as in forward-word), or the point is moved too far when the user wants to search for a part of a word. But OTOH sometimes calling isearch-yank-word-or-char repeatedly may be better than switching between isearch-yank-word and isearch-yank-char. And I'm still worried that new C-f and C-b key bindings can be too intrusive for people who expect that they exit isearch. Especially since I tried now to use old Emacs motion keys instead of arrow keys, it really seems that they can confuse if they do something different than exiting isearch. So given all this, here is another idea: (define-key isearch-mode-map "\C-w" 'isearch-yank-word) (define-key isearch-mode-map "\C-\M-w" 'isearch-yank-word-or-char) (define-key isearch-mode-map "\C-\M-b" 'isearch-del-char) (define-key isearch-mode-map "\C-\M-f" 'isearch-yank-char) These are less probable keys to exit isearch. And if the goal is to retain backward compatibility as much as possible, then the following key bindings will satisfy this requirement: (define-key isearch-mode-map "\C-w" 'isearch-yank-word-or-char) (define-key isearch-mode-map "\M-w" 'isearch-yank-word) (define-key isearch-mode-map "\C-\M-w" 'isearch-del-char) (define-key isearch-mode-map "\C-\M-y" 'isearch-yank-char) or (define-key isearch-mode-map "\C-w" 'isearch-yank-word-or-char) (define-key isearch-mode-map "\M-w" 'isearch-del-char) (define-key isearch-mode-map "\C-\M-w" 'isearch-yank-char) (define-key isearch-mode-map "\C-\M-y" 'isearch-yank-word) -- Juri Linkov http://www.jurta.org/emacs/