comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » autocomplete
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
autocomplete [message #43347] Wed, 30 March 2005 00:48 Go to next message
maarten is currently offline  maarten
Messages: 30
Registered: April 2002
Member
Hello everybody,

I was wondering whether it is possible to have some sort of
autocompletion at the IDL prompt in Linux. When working in Matlab for
example typing the first few letters of a command or file and pressing
'tab' results in automatic completing the rest. (the same way the
xterminal works). Another very useful feature is that when the first few
letters are typed, pressing 'arrow up' results in only history results
that start with these letters. Is it possible to have this implemented
in IDL, or are there any other 'terminal' like command lines that offer
these features in which IDL can be run. At the moment I am running IDL
at the command line under Linux.
I hope someone knows whether this is possible, or that RSINC is working
on something like this. Because in my opinion it would greatly improve IDL.

Cheers maarten.
Re: autocomplete [message #43357 is a reply to message #43347] Thu, 07 April 2005 14:46 Go to previous messageGo to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Thu, 07 Apr 2005 07:02:39 -0700, ismxray@yahoo.com wrote:

> The IDLWAVE is really what I want for such a long time in the
> terminals.
> But when I work throung the tutorial, I cannot make it work in Xemacs,
> for such M-TAB to show the routine info, and plot_ + "TAB" to
> autocomplete the command line
> in shell. However, I can make it in emacs. I use the pre-compiled
> idlwave-xemacs package.
> And I have to disable the CTRL+TAB, ALT+TAB in KDE, which is used to
> switch the windows
> in KDE by default. How can one make IDLWAVE work in Xemacs just as in
> emacs? Thanks!

It's possible your package isn't being found by XEmacs. I'm not an
expert on XEmacs packages, but look for "IDLWAVE" in the command line, and
ensure that C-h v idlwave-mode-version [RET] is the version you expect.
Routine info is on C-c ? by default. Completion is M-Tab in a buffer, and
plain Tab in the shell.

JD
Re: autocomplete [message #43374 is a reply to message #43347] Thu, 07 April 2005 09:43 Go to previous messageGo to next message
savoie is currently offline  savoie
Messages: 68
Registered: September 1996
Member
JD Smith <jdsmith@as.arizona.edu> writes:

> On Wed, 06 Apr 2005 09:24:31 -0600, savoie wrote:
>> savoie@nsidc.org writes:
>
> What if you just want the previous command, how do you do that (I forget
> if I handled that)?

I left the normal M-p and M-n for comint-previous-input and
comint-next-input. So I have the [up] for your substring history search, and
M-p for the last behavior. Alternatively, just do [up] with nothing on the
command line.

Matt


--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
Re: autocomplete [message #43378 is a reply to message #43347] Thu, 07 April 2005 07:02 Go to previous messageGo to next message
ismxray@yahoo.com is currently offline  ismxray@yahoo.com
Messages: 13
Registered: January 2005
Junior Member
The IDLWAVE is really what I want for such a long time in the
terminals.
But when I work throung the tutorial, I cannot make it work in Xemacs,
for such M-TAB to show the routine info, and plot_ + "TAB" to
autocomplete the command line
in shell. However, I can make it in emacs. I use the pre-compiled
idlwave-xemacs package.
And I have to disable the CTRL+TAB, ALT+TAB in KDE, which is used to
switch the windows
in KDE by default. How can one make IDLWAVE work in Xemacs just as in
emacs? Thanks!
Re: autocomplete [message #43384 is a reply to message #43347] Wed, 06 April 2005 17:53 Go to previous messageGo to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 06 Apr 2005 09:24:31 -0600, savoie wrote:

> savoie@nsidc.org writes:
>
>> JD Smith <jdsmith@as.arizona.edu> writes:
>>
>>> On Fri, 01 Apr 2005 15:56:08 +0200, maarten wrote:
>>
>>> I just discovered C-c M-r, which is comint's way of doing a search for
>>> previous input based on the existing input, without any prompting.
>>
>> Oh! look at that. I'll be replacing that right away. :) Not that I don't
>> love your hack....
>
> I spoke too soon. The comint-previous-matching-input-from-input, only
> searches back from what's on the beginning of the line.
>
> so if I have a print of a strange variable name, with the comint way I have
> to start the line with
> IDL> print, beg[up]
>
> and that will get substitued with
> IDL> print, beginning_of_a_stupidly_long_variable_name
>
> with jds-history-search-up I only need the beg[up]
>
> IDL> beg[up]
>
> Just a note. :)

What if you just want the previous command, how do you do that (I forget
if I handled that)?

JD
Re: autocomplete [message #43395 is a reply to message #43347] Wed, 06 April 2005 08:24 Go to previous messageGo to next message
savoie is currently offline  savoie
Messages: 68
Registered: September 1996
Member
savoie@nsidc.org writes:

> JD Smith <jdsmith@as.arizona.edu> writes:
>
>> On Fri, 01 Apr 2005 15:56:08 +0200, maarten wrote:
>
>> I just discovered C-c M-r, which is comint's way of doing a search for
>> previous input based on the existing input, without any prompting.
>
> Oh! look at that. I'll be replacing that right away. :) Not that I don't
> love your hack....

I spoke too soon. The comint-previous-matching-input-from-input, only
searches back from what's on the beginning of the line.

so if I have a print of a strange variable name, with the comint way I have
to start the line with
IDL> print, beg[up]

and that will get substitued with
IDL> print, beginning_of_a_stupidly_long_variable_name

with jds-history-search-up I only need the beg[up]

IDL> beg[up]

Just a note. :)

Matt

--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
Re: autocomplete [message #43440 is a reply to message #43347] Fri, 08 April 2005 11:38 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Fri, 08 Apr 2005 06:52:55 -0700, ismxray@yahoo.com wrote:

> idlwave is loaded. As I type " C-h v idlwave-mode-version [RET] ", it
> gives:
> `idlwave-mode-version' is a variable declared in Lisp.
> -- loaded from "idlwave"
>
> Value: "5.1"
>
> Documentation:
> not documented as a variable.
> =======
> I can use TAB to ident the program when editing, or use C-x h and the
> C-M-\ to indent the whole region, even C-c C-s to run the shell, and
> C-c C-d C-c to compile the procedure. But the functions like the
> completion do not work both in buffer and in shell, by tying shortcut
> or selecting from the menu.
> Is there anything warong with Xemacs?

Not in principle, plenty of people use XEmacs with IDLWAVE (I use and
develop IDLWAVE with GNU Emacs). What sort of error do you get, something
like "no completion for XXXX"? That means it's working, but there is
nothing to complete by that name. Look in your *Messages* buffer and note
anything unusual when you try completion.

JD
Re: autocomplete [message #43447 is a reply to message #43357] Fri, 08 April 2005 06:52 Go to previous message
ismxray@yahoo.com is currently offline  ismxray@yahoo.com
Messages: 13
Registered: January 2005
Junior Member
idlwave is loaded. As I type " C-h v idlwave-mode-version [RET] ", it
gives:
`idlwave-mode-version' is a variable declared in Lisp.
-- loaded from "idlwave"

Value: "5.1"

Documentation:
not documented as a variable.
=======
I can use TAB to ident the program when editing, or use C-x h and the
C-M-\ to indent the whole region, even C-c C-s to run the shell, and
C-c C-d C-c to compile the procedure. But the functions like the
completion do not work both in buffer and in shell, by tying shortcut
or selecting from the menu.
Is there anything warong with Xemacs?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Demo Use
Next Topic: vector matrix multipication

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:55:35 PDT 2025

Total time taken to generate the page: 0.00841 seconds