From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20606 invoked from network); 17 Jan 2009 19:17:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Jan 2009 19:17:47 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 60815 invoked from network); 17 Jan 2009 19:17:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Jan 2009 19:17:42 -0000 Received: (qmail 18119 invoked by alias); 17 Jan 2009 19:17:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26350 Received: (qmail 18109 invoked from network); 17 Jan 2009 19:17:37 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Jan 2009 19:17:37 -0000 Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by bifrost.dotsrc.org (Postfix) with ESMTP id 9121E80271F0 for ; Sat, 17 Jan 2009 20:17:34 +0100 (CET) Received: from torch.brasslantern.com ([96.238.220.215]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KDM00DEXQWVVDX7@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 17 Jan 2009 13:17:25 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id n0HJHIEO008875 for ; Sat, 17 Jan 2009 11:17:19 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n0HJHI1s008874 for zsh-workers@sunsite.dk; Sat, 17 Jan 2009 11:17:18 -0800 Date: Sat, 17 Jan 2009 11:17:18 -0800 From: Bart Schaefer Subject: Re: changing bindings in isearch mode? In-reply-to: <18801.32959.693653.15539@gargle.gargle.HOWL> To: Zsh list Message-id: <090117111718.ZM8873@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <18801.32959.693653.15539@gargle.gargle.HOWL> Comments: In reply to Greg Klanderman "changing bindings in isearch mode?" (Jan 17, 1:54am) X-Virus-Scanned: ClamAV 0.92.1/8873/Sat Jan 17 04:33:31 2009 on bifrost X-Virus-Status: Clean On Jan 17, 1:54am, Greg Klanderman wrote: } } It looks like the isearch mode bindings are hardcoded, is that right? Sort of. isearch was implemented before zsh had the concept of keymaps, so instead of using a keymap with its own set of widgets, it hijacks the names of the widgets from the original keymap and does its own internal thing when it sees you attempt to execute one of those widgets. } I'd really like to have bound to exit isearch, like it does } in emacs.. } } Would it make sense to have an isearch keymap and use that? I believe you should be able to accomplish this with a user-defined wrapper widget that selects the keymap you want and then invokes the appropriate built-in incremental-search widget. I agree that's not the best solution and that it would be better to re-implement isearch with real widgets. } Is there a key in isearch mode that will just exit isearch at the } current position, and nothing else? Yes: Any undefined key. So to make do that, you just have to "bindkey -r ^M" (and possibly also ^J) in the keymap used by the aforementioned wrapper widget.