[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a suggested solution for better external' completion in certain emac
From: |
Nic Ferrier |
Subject: |
Re: a suggested solution for better external' completion in certain emacs modes |
Date: |
Tue, 09 Nov 2004 00:35:01 +0000 |
Stefan Monnier <address@hidden> writes:
>> - Emacs starts a Readline program, eg: psql (the PostgreSQL client)
>> with a special option specifying signifying this mode of operation.
>
> A command-line argument is probably a bad idea (for cases like when you
> start psql via a script (or a make file), ...). An env-var would be good.
>
>> This seems like it wouldn't be that hard to add to Emacs and probably
>> not to Readline either.
>
> Sounds like a good idea.
>
> Such tools often offer things like a `listcompletions' commands which
> Emacs can use to implement the completion itself. Such a thing is used by
> GUD for gdb.
Readline has a few standard functions:
int rl_complete_internal (int what_to_do)
int rl_complete (int ignore, int invoking_key)
int rl_possible_completions (int count, int invoking_key)
int rl_insert_completions (int count, int invoking_key)
int rl_completion_mode (rl_command_func_t *cfunc)
Which, AFAIK, is what *most* programs doing completion use. This is
what Readline should advertise to Emacs (or whatever, this wouldn't be
Emacs specific necessarily).
There are a number of other Readline completion tools and, with
slightly a complex advertising protocol, it would be possible to hook
those in too.
> Standardizing support for such things directly in comint might
> also be a good idea, tho not as good because it only works for those
> programs that go to the trouble of providing a `listcompletions'
> command.
But it wouldn't be difficult for comint to detect when this behaviour
is offered by Readline, either:
- do a version detect on the readline .so
- have this feature make readline send a "hello", when the "hello"
isn't received then comint will know this feature is not available.
--
Nic Ferrier
http://www.tapsellferrier.co.uk
- Re: GTK emacs (and access to GTK), (continued)
Re: GTK emacs (and access to GTK), Jan D., 2004/11/02
Re: GTK emacs (and access to GTK), Peter Heslin, 2004/11/03
- Re: GTK emacs (and access to GTK), Jan D., 2004/11/03
- Re: GTK emacs (and access to GTK), Nic Ferrier, 2004/11/03
- a suggested solution for better external' completion in certain emacs modes, Nic Ferrier, 2004/11/08
- Re: a suggested solution for better external' completion in certain emacs modes, Richard Stallman, 2004/11/09
- Re: a suggested solution for better external' completion in certain emacs modes, Nic Ferrier, 2004/11/09
- Re: a suggested solution for better external' completion in certain emacs modes, Richard Stallman, 2004/11/10
- Re: a suggested solution for better external' completion in certain emacs modes, Nic Ferrier, 2004/11/11
- Re: a suggested solution for better external' completion in certain emacs modes, Kai Grossjohann, 2004/11/11
- Re: a suggested solution for better external' completion in certain emacs modes, Nic Ferrier, 2004/11/11
- Re: a suggested solution for better external' completion in certain emacs modes, Kai Grossjohann, 2004/11/11
- Re: a suggested solution for better external' completion in certain emacs modes, Nic Ferrier, 2004/11/11
Re: a suggested solution for better external' completion in certain emacs modes, Richard Stallman, 2004/11/12
Re: a suggested solution for better external' completion in certain emacs modes, Nic Ferrier, 2004/11/12