1

I am new to Emacs and trying to set up octave so that it runs inside Emacs. I followed the instructions on the official website but it didn't work as Emacs threw a error

searching for program: no such file or directory, octave

Following the directions given on a similar question in stack overflow, I added octave in environment variables and the commandline launches octave without any issues but the problem on Emacs persisted.

I tried the solution given on this link but the problem persists.

My init.el file looks like this

(autoload 'octave-mode "octave-mod" nil t)
(setq inferior-octave-program "C:/Octave/Octave-5.1.0.0/octave.vbs")
(setq auto-mode-alist
      (cons '("\\.m$" . octave-mode) auto-mode-alist))

(add-hook 'octave-mode-hook
          (lambda ()
            (abbrev-mode 1)
            (auto-fill-mode 1)
            (if (eq window-system 'x)
                (font-lock-mode 1))))

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

And the error message is

searching for program: no such file or directory, C:/Octave/Octave-5.1.0.0/octave.vbs

1
  • octave-mode comes preconfigured with Emacs, so the first line above is redundant (and even harmful because octave-mod.el has been renamed in "recent" Emacsen).
    – Stefan
    Commented May 11, 2019 at 14:28

1 Answer 1

0

In my case (Windows 10, Emacs 29.4, Octave 9.2.0), it was enough to add C:\Program Files\GNU Octave\Octave-9.2.0\mingw64\bin to the path to get it running. After that, the emacs command run-octave starts as an "Inferior Octave" process and launches Octave therein.

No changes in ~/.emcas.d/init.el were necessary. More specifically, I did not change inferior-octave-program, which defaults to octave.

After getting it up and running, you may want to run Customize Octave from the Octave menu in Emacs to see the available options and adjust them to fit your preferences.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.