From: Peter Stephenson <Peter.Stephenson@csr.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: $KEYMAP in command, isearch and menuselect
Date: Mon, 23 Aug 2010 11:01:27 +0100 [thread overview]
Message-ID: <20100823110127.7566d360@csr.com> (raw)
In-Reply-To: <20100823103638.2fb7e695@csr.com>
On Mon, 23 Aug 2010 10:36:38 +0100
Peter Stephenson <Peter.Stephenson@csr.com> 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 <pws@csr.com> 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
next parent reply other threads:[~2010-08-23 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <op.vg6lcz2hvocxtk@tabole>
[not found] ` <20100823103638.2fb7e695@csr.com>
2010-08-23 10:01 ` Peter Stephenson [this message]
2010-08-23 10:08 ` Mikael Magnusson
2010-08-23 13:43 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100823110127.7566d360@csr.com \
--to=peter.stephenson@csr.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).