views:

355

answers:

1

I'm trying to run Octave from within emacs (I'm mostly a beginner at both but have the hang of emacs shortcuts now). When I try run-octave as suggested here, I get the message.

Searching for file, no such file or directory, octave

Disclaimer: I'm using Windows Vista. Octave is in c:\Octave... the emacs default directory is c:\users\username\

and I added this to the _emacs file:

(autoload 'octave-mode "octave-mod" nil t)

    (setq auto-mode-alist
            (cons '("\\.m$" . octave-mode) auto-mode-alist))

(autoload 'run-octave "octave-inf" nil t)

Any tips on how to tell emacs where octave is?

Thank you for your help in advance, Massagran

+1  A: 

You need to make sure the octave binary, probably under "C:\Octave\bin", is in the search path.

To check this, right click your "Computer" icon on the Desktop or the Start Menu, right-click, select "Properties" and then select "Advanced System Settings". Click the "Environments variables" button and look for PATH. If you can't find the octave directory mentioned in this variable append ";C:\Octave\bin".

For more information on how to set the PATH variable check for example here.

danielpoe
Worked like charm. thank you.
Massagran