zsh-workers
 help / color / mirror / code / Atom feed
* Re: $KEYMAP in command, isearch and menuselect
       [not found] ` <20100823103638.2fb7e695@csr.com>
@ 2010-08-23 10:01   ` Peter Stephenson
  2010-08-23 10:08     ` Mikael Magnusson
  2010-08-23 13:43     ` Bart Schaefer
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Stephenson @ 2010-08-23 10:01 UTC (permalink / raw)
  To: Zsh Hackers' List

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: $KEYMAP in command, isearch and menuselect
  2010-08-23 10:01   ` $KEYMAP in command, isearch and menuselect Peter Stephenson
@ 2010-08-23 10:08     ` Mikael Magnusson
  2010-08-23 13:43     ` Bart Schaefer
  1 sibling, 0 replies; 3+ messages in thread
From: Mikael Magnusson @ 2010-08-23 10:08 UTC (permalink / raw)
  To: Zsh Hackers' List

On 23 August 2010 12:01, Peter Stephenson <Peter.Stephenson@csr.com> wrote:
> 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.

fwiw, git blame says this paragraph comes from the "Initial revision"
commit from 1999.

-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: $KEYMAP in command, isearch and menuselect
  2010-08-23 10:01   ` $KEYMAP in command, isearch and menuselect Peter Stephenson
  2010-08-23 10:08     ` Mikael Magnusson
@ 2010-08-23 13:43     ` Bart Schaefer
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2010-08-23 13:43 UTC (permalink / raw)
  To: Zsh Hackers' List

On Aug 23, 11:01am, Peter Stephenson wrote:
}
} 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.

I think this is a leftover from a previous generation of handling of
multi-character bindings, and probably should have changed years ago
had anyone thought to pay attention.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-23 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <op.vg6lcz2hvocxtk@tabole>
     [not found] ` <20100823103638.2fb7e695@csr.com>
2010-08-23 10:01   ` $KEYMAP in command, isearch and menuselect Peter Stephenson
2010-08-23 10:08     ` Mikael Magnusson
2010-08-23 13:43     ` Bart Schaefer

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).