From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17625 invoked from network); 23 Apr 2006 06:09:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Apr 2006 06:09:59 -0000 Received: (qmail 51815 invoked from network); 23 Apr 2006 06:09:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Apr 2006 06:09:52 -0000 Received: (qmail 25871 invoked by alias); 23 Apr 2006 06:09:45 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10168 Received: (qmail 25857 invoked from network); 23 Apr 2006 06:09:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Apr 2006 06:09:44 -0000 Received: (qmail 50803 invoked from network); 23 Apr 2006 06:09:44 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 23 Apr 2006 06:09:42 -0000 Received: from torch.brasslantern.com ([71.116.76.26]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IY500EETVS2ZS64@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Sun, 23 Apr 2006 01:09:39 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k3N69TWD009843 for ; Sat, 22 Apr 2006 23:09:38 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k3N69T0e009842 for zsh-users@sunsite.dk; Sat, 22 Apr 2006 23:09:29 -0700 Date: Sat, 22 Apr 2006 23:09:29 -0700 From: Bart Schaefer Subject: Re: Problem with motion commands defined using match-word-by-style used with vi-delete In-reply-to: To: "Zsh Users" Message-id: <060422230929.ZM9841@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <060421220035.ZM7625@torch.brasslantern.com> <060422113544.ZM9246@torch.brasslantern.com> Comments: In reply to "Nikolai Weibull" "Re: Problem with motion commands defined using match-word-by-style used with vi-delete" (Apr 22, 11:38pm) On Apr 22, 11:38pm, Nikolai Weibull wrote: } } I'm positive that there's a way to do this, but I can't see it, so any } help is welcome. In the short term, I think it'd work to reset $WIDGET yourself: local WIDGET=$motion_command zle $motion_command -n $count } I'm sure it'll break all kinds of stuff, but one solution would be to } have getvirange() set bindk to k2 once it has been read and checked. I don't think that's sufficient. getvirange() would have to fiddle with saving and restoring some other state around the call to execzlefunc(). } Also, it would be great if we had a switch for bindkey that made it } print the widgets name, nothing else. It' be better if we had a $bindings associative array to go with $keymaps and $widgets, and a zle function along the lines of recursive-edit except it reads only one binding. For example, it's rather messy to reimplement describe-key-briefly in the shell: describe-key-briefly() { setopt localoptions extendedglob local -a bound rebound local b f=__-get-widget-name bindkey -N __ $KEYMAP bound=( ${${(f)"$(bindkey -M __ -L)"}/(#b)([^[:space:]]#)(#e)/__-$match} ) rebound=( ${(u)bound##* } ) function $f { zle -M "${(V)KEYS} is ${WIDGET#__-}" zle .accept-line # end recursive-edit } for b in $rebound do zle -N $b $f done eval "${(j:;:)bound}" # Cf. read-from-minibuffer if you insist on having # correct cursor placement during this prompt zle -M "Describe key briefly: " zle .recursive-edit -K __ } This may suggest another way to implement vi-delete-match, though. Hmm.