From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28345 invoked from network); 26 Jan 2003 05:22:20 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Jan 2003 05:22:20 -0000 Received: (qmail 18748 invoked by alias); 26 Jan 2003 05:21:54 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5832 Received: (qmail 18741 invoked from network); 26 Jan 2003 05:21:54 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 26 Jan 2003 05:21:54 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.46.181.248] by sunsite.dk (MessageWall 1.0.8) with SMTP; 26 Jan 2003 5:21:53 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h0Q5LtZ17293 for zsh-users@sunsite.dk; Sat, 25 Jan 2003 21:21:55 -0800 From: "Bart Schaefer" Message-Id: <1030126052154.ZM17292@candle.brasslantern.com> Date: Sun, 26 Jan 2003 05:21:54 +0000 In-Reply-To: <20030126025944.6740.qmail@web12301.mail.yahoo.com> Comments: In reply to Le Wang "`copy-earlier-word' and `smart-insert-last-word" (Jan 25, 9:59pm) References: <20030126025944.6740.qmail@web12301.mail.yahoo.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh users list Subject: Re: `copy-earlier-word' and `smart-insert-last-word MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 25, 9:59pm, Le Wang wrote: } } `copy-earlier-word' works well (cycles through words on the } same history line) with `insert-last-word', but it fails with } `smart-insert-last-word'. The problem is that smart-insert-last-word counts shell parser "word" tokens, whereas insert-last-word counts ZLE words (i.e., the substrings that forward-word and backward-word move across); copy-earlier-word always runs `zle .insert-last-word ...', so it won't always pick the same word as smart-insert-last-word. (Most of the Functions/Zle widgets were designed independently of one another, and no concerted effort has been made to make sure that they all cooperate. The `*insert-last-word' test is just meant to cover insert-last-word both with and without the leading dot -- it's an accident that it also matches smart-insert-last-word.) In order to fix this, smart-insert-last-word has to be modified to accept the two arguments that insert-last-word accepts, and then copy-earlier-word has to store the value of $LASTWIDGET for re-use the same way it stores __copyword. I have no patch at this point.