help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Using readline with Emacs shell or eshell or ???


From: John W. Eaton
Subject: Re: Using readline with Emacs shell or eshell or ???
Date: 29 Apr 2003 00:31:06 -0500

Robert@Knighten.org (Robert L. Knighten) writes:

> I am writing a command line program in which I want to have command line
> editing, command and argument completion, history, etc.  The GNU Readline
> package does this quite nicely, BUT my users will often actually want to
> invoke the program inside the Emacs shell or perhaps eshell.  Of course
> command line editing works just fine, but command and argument completion are
> lost.  What is the best way of working around this?
> 
> I'm prepared to write some substantial elisp if that is the way to go.  But I
> hope there is something already done.

For an example that works (but might not be the best implementation)
take a look at the inferior-octave-complete function in the Emacs mode
for running Octave inside Emacs (octave-inf.el).  The Emacs function
for completion sends a command to Octave to generate completions and
then displays them.  It uses comint for some of the ugly stuff, so the
amount of Lisp code specific to the Octave mode is relatively small.
If you can make it smaller and cleaner, I'd be interested in patches.

jwe

-- 
www.octave.org        | Unfortunately we were hopelessly optimistic in 1954
www.che.wisc.edu/~jwe | about the problems of debugging FORTRAN programs.
                      |                                       -- J. Backus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]