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: word-search toggle for isearch [was: Info-search-isearch] Date: Tue, 12 Dec 2006 08:30:49 -0800 Message-ID: References: <87k62inadw.fsf@jurta.org> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1165941145 13754 80.91.229.10 (12 Dec 2006 16:32:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Dec 2006 16:32:25 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 12 17:32:23 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GuAYI-0005VE-N4 for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2006 17:32:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuAYH-0005eN-UB for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2006 11:32:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuAXy-0005bz-Se for emacs-devel@gnu.org; Tue, 12 Dec 2006 11:32:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuAXw-0005aB-6W for emacs-devel@gnu.org; Tue, 12 Dec 2006 11:32:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuAXw-0005a1-1o for emacs-devel@gnu.org; Tue, 12 Dec 2006 11:32:00 -0500 Original-Received: from [148.87.113.118] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GuAXv-0007uk-Mw for emacs-devel@gnu.org; Tue, 12 Dec 2006 11:31:59 -0500 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id kBCGVvjv027423 for ; Tue, 12 Dec 2006 09:31:57 -0700 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id kBCGNLml016661 for ; Tue, 12 Dec 2006 09:31:56 -0700 Original-Received: from dhcp-amer-csvpn-gw2-141-144-73-226.vpn.oracle.com by rcsmt250.oracle.com with ESMTP id 2279109401165941053; Tue, 12 Dec 2006 09:30:53 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <87k62inadw.fsf@jurta.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Whitelist: TRUE X-Whitelist: TRUE X-Brightmail-Tracker: AAAAAQAAAAI= 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:63633 Archived-At: Both Juri and Stefan have sent (essentially the same) code for toggling word search in incremental search: > From: Juri Linkov Sent: Sunday, October 29, 2006 12:19 PM > To: emacs-devel@gnu.org > Subject: Re: Info-search-isearch > (defun isearch-toggle-word () > "Toggle word searching on or off." > (interactive) > (setq isearch-word (not isearch-word)) > (setq isearch-success t isearch-adjusted t) > (isearch-update)) > > and a new keybinding: > (define-key isearch-mode-map "\M-sw" 'isearch-toggle-word) > will provide a easier way to toggle on/off incremental word search. > From: Stefan Monnier Sent: Thursday, November 23, 2006 11:25 AM > To: help-gnu-emacs@gnu.org > Subject: Re: incremental search > (defun isearch-toggle-word () > "Toggle word searching on or off." > ;; The status stack is left unchanged. > (interactive) > (setq isearch-word (not isearch-word)) > (if isearch-word (setq isearch-regexp nil)) > (setq isearch-success t isearch-adjusted t) > (isearch-update)) Juri proposed binding this to M-sw. Stefan suggested M-w instead. Users of most editors expect a simple, quick way to toggle word searching. How to do this in Emacs is a FAQ. We have even gone to the trouble of documenting C-s M-e M-w WORD C-s, but we have not added a simple binding for this. How about adding this feature (toggle command and binding) to Emacs now?