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

Home » Public Forums » archive » Re: Using ENVI with IDLWAVE
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
Re: Using ENVI with IDLWAVE [message #55785] Wed, 12 September 2007 18:14 Go to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 12 Sep 2007 15:17:33 -0600, David Fanning wrote:

> Folks,
>
> I'm not sure I would even understand the answer to this question, but let
> me ask it anyway. I'm using the IDLWAVE mode in Emacs. I still can't
> remember always how to do a damn search and replace, but it's coming
> along, making progress. When I am working in IDL, a CNTL-C-D-C compiles
> the file I am editing. But this *doesn't* happen when I have started up
> ENVI from within my IDL session (by typing "envi"). Why not? And what can
> I do to make the commands I *do* know how to use in IDLWAVE work when I am
> working with ENVI?

See FAQ number 8:

http://idlwave.org/idlwave.html#TROUBLE

I've never used ENVI. Basically, IDLWAVE looks for "IDL>" all over the
place, and not seeing it really makes it unhappy. I would guess that
something like:

(setq idlwave-shell-prompt-pattern
(replace-regexp-in-string "IDL" "\\\\(IDL\\\\|ENVI\\\\)"
idlwave-shell-prompt-pattern))

inside of your idlwave-shell-mode-hook, in your .emacs file might
solve the problem for you (all those backquotes are needed -- the joys of
Elisp). Just to be explicit, if you don't already have such a hook, this
would be:

(add-hook 'idlwave-shell-mode-hook
(lambda ()
(setq idlwave-shell-prompt-pattern
(replace-regexp-in-string "IDL" "\\\\(IDL\\\\|ENVI\\\\)"
idlwave-shell-prompt-pattern))))

Restart Emacs and try again.

Now, if I were really clever, I'd read the contents of !PROMPT every
so often to make sure it hasn't changed, so IDLWAVE can look for the
correct prompt. The problem is knowing when to do this. Are there other
prompts which are common, that need to be dealt with? Perhaps I'll just
update the regexp once and for all.

JD

P.S. M-%
Re: Using ENVI with IDLWAVE [message #55923 is a reply to message #55785] Thu, 13 September 2007 08:45 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JD Smith writes:

> I've never used ENVI. Basically, IDLWAVE looks for "IDL>" all over the
> place, and not seeing it really makes it unhappy. I would guess that
> something like:
>
> (setq idlwave-shell-prompt-pattern
> (replace-regexp-in-string "IDL" "\\\\(IDL\\\\|ENVI\\\\)"
> idlwave-shell-prompt-pattern))

Uh, huh. It was a bit easier to do this:

ENVI> !Prompt = 'IDL> '

Then everything is back to normal! :-)

Thanks.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Widget Definition from the Event Handler?
Next Topic: ENVI File Question

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

Current Time: Wed Oct 08 11:35:41 PDT 2025

Total time taken to generate the page: 0.00905 seconds