Ilya Zakharevich on Wed, 27 Nov 2002 12:37:22 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PATCH CVS] Readline improvements

On Wed, Nov 27, 2002 at 10:33:40AM +0100, Karim BELABAS wrote:
> >> 1) it is all too common to hit TAB once to many and get arguments inserted
> >> without wanting it.
> >
> > ??? Just do what you do with any other key: press Alt-Backspace.
> Alt-Backspace = backward-delete-word is it not ?

No, by CUA Alt-Backspace is undo.  [Emacs botched it, and
Meta-Backspace is backward-delete-word there; it should have been on

> > So fix the default keymap; what is the problem?

> That it is a not-so-user-friendly default behaviour.

As I said: so fix it.  No wonder that the default behaviour is
unusable, readline coming from FSF (with no clue about UIs)...

> > Anyway, with the new default(readline) it is easy to make this behaviour
> > conditional...

> IMHO, that's the best solution. Default being off.

"Off" meaning do not show help, and do something reasonable instead?  ;-)

> > > 3) what is the purpose of inserting templates, when actual parameters will
> > > have in 99.99% of cases a different name ?

> > I find it indispensable to have the info about the order of arguments
> > without a need to look at a different part of the screen.

> OK. With <F1>/<M-h> it appears a few lines above due to the help text. Then,
> why not print the (1-line) prototype in the message zone ?

Message zone is gone when you start editing.

> > BTW, anybody having a snippet of code how not to overwrite keys in
> > .inputrc?

> Easiest solution I can think of is: bind everything then reload .intputrc
> ( rl_read_init_file(NULL) )

Simple and powerful.  But this will break when FSF collect their wits
and start populating bindings basing on terminfo descriptions...

> Again, I'm open to your solution (would not have included the patch
> otherwise:-). Can you document your new readline default ?

There should be some way to get help for default() subcommands.  Doing
F1 F1 on `default' gives

 See Section (??)  for a list of available defaults

which is not very useful...

BTW, ?\ does not list \o3.

BTW, doing

  cd doc; make manpages

does not produce manpage for the tutorial.  And the generated manpages
have names which are not good enough.  Should not we pick up more
descriptive names and *install* the manpages?

[On mouseedit]:

> > [I got this idea when observing Don Zagier using both keyboard and
> > mouse in one of sun tools (do not remember which)
> commandtools (mostly incompatible with readline, sad.)

When multi-line mouse editing is both in xterm and GP, gp-in-xterm is
*almost* as mouse-friendly as the sun tools; *and* has readline.
[IIRC, Sun tools allow direct editing of old input in the screen
buffer.  *This* may be much harder to implement than what I added to
xterm.  Any ideas?