From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14273 invoked by alias); 23 Aug 2010 10:01:45 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28188 Received: (qmail 14568 invoked from network); 23 Aug 2010 10:01:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Mon, 23 Aug 2010 11:01:27 +0100 From: Peter Stephenson To: "Zsh Hackers' List" Subject: Re: $KEYMAP in command, isearch and menuselect Message-ID: <20100823110127.7566d360@csr.com> In-Reply-To: <20100823103638.2fb7e695@csr.com> References: <20100823103638.2fb7e695@csr.com> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; i686-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Aug 2010 10:01:31.0857 (UTC) FILETIME=[2983D410:01CB42AA] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.68.0.159 On Mon, 23 Aug 2010 10:36:38 +0100 Peter Stephenson wrote: > Basically, the only thing you can do > is bind one of the names listed in the documentation to a different > key. The documentation should probably be clearer the behaviour isn't > extensible. Internally, this is because those modes are each > implemented within a single function, not by looking up function > behaviour like standard editing behaviour. (Moved to zsh-workers.) This might clear up the documentation a bit. isearch already has a note about limitations thought it doesn't explicitly say you can't extend the list of commands. I'm now scratching my head over this in the isearch doc: Any multi-character string that is not bound to one of the above functions will beep and interrupt the search, leaving the last found line in the buffer. Any single character that is not bound to one of the above functions, or tt(self-insert) or tt(self-insert-unmeta), will have the same effect but the function will be executed. I don't think this distinction exists --- I think any unrecognised binding will have the same effect, of leaving isearch and executing that command. Also, this is a bit confusing in that it doesn't note that printable multibyte characters are handled they way you expect. It might be I removed it as a side-effect of adding multibyte handling but I don't see any evidence of the distinction being explicit in 4.2. Maybe we were documenting some ancient restriction that went when Zefram rewrote ZLE. I think this can just be rewritten to say the search is interrupted and the command executed. I'm not convinced it even beeps (but I always have that turned off). Index: Doc/Zsh/mod_complist.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/mod_complist.yo,v retrieving revision 1.29 diff -p -u -r1.29 mod_complist.yo --- Doc/Zsh/mod_complist.yo 30 Nov 2009 17:26:54 -0000 1.29 +++ Doc/Zsh/mod_complist.yo 23 Aug 2010 09:46:26 -0000 @@ -291,7 +291,10 @@ Selecting matches is done by moving the functions. When not all matches can be shown on the screen at the same time, the list will scroll up and down when crossing the top or bottom line. The following zle functions have special meaning during -menu selection: +menu selection. Note that the following always +perform the same task within the menu selection map and cannot be +replaced by user defined widgets, nor can the set of functions +be extended: startitem() item(tt(accept-line), tt(accept-search))( Index: Doc/Zsh/zle.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zle.yo,v retrieving revision 1.83 diff -p -u -r1.83 zle.yo --- Doc/Zsh/zle.yo 11 Aug 2010 12:48:20 -0000 1.83 +++ Doc/Zsh/zle.yo 23 Aug 2010 09:46:26 -0000 @@ -1146,7 +1146,8 @@ An interrupt signal, as defined by the s setting, will stop the search and go back to the original line. An undefined key will have the same effect. Note that the following always perform the same task within incremental searches and cannot be -replaced by user defined widgets. The supported functions are: +replaced by user defined widgets, nor can the set of functions +be extended. The supported functions are: startitem() xitem(tt(accept-and-hold)) @@ -1888,7 +1889,10 @@ execute it. A restricted set of editing mini-buffer. Keys are looked up in the special tt(command) keymap, and if not found there in the main keymap. An interrupt signal, as defined by the stty setting, will -abort the function. The allowed functions are: +abort the function. Note that the following always +perform the same task within the tt(executed-named-cmd) environment and +cannot be replaced by user defined widgets, nor can the set of functions +be extended. The allowed functions are: tt(backward-delete-char), tt(vi-backward-delete-char), tt(clear-screen), -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom