在iMac上从Emacs运行Octave [英] Run Octave from Emacs on iMac
问题描述
Octave已安装在我的iMac上的/applications
中,并且可以正常运行.
Emacs已安装在我的iMac上的/applications
中,并且可以进行文件编辑.
现在,我想从Emacs运行Octave. M-x run-octave
导致:
Octave is installed on my iMac in /applications
and works properly.
Emacs is installed on my iMac in /applications
and file editing is possible.
Now I want to run Octave from Emacs. M-xrun-octave
results in:
Searching for program: No such file or directory, octave
在Windows中,我通过在环境路径中添加八度来解决了这个问题,如何在Mac上做到这一点?
In Windows I solved this problem by adding Octave to the environment path, how can I do this on a Mac?
提前感谢,汉斯·塞梅耶尔
Thank in advance, Hans Sellmeijer
推荐答案
感谢乔恩(Jon),Emacs在使用Snow Leopard的iMac上正确处理了Octave. ".emacs"文件包含:
Thanks to Jon, Emacs handles Octave properly on iMac with Snow-Leopard. The ".emacs" file contains:
(add-to-list 'exec-path "/applications/Octave.app/Contents/Resources/bin")
(autoload 'octave-mode "octave-mod" nil t)
(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)
在从.PDF手册中复制这些行时要小心.报价被变形为转义序列,这削弱了正确的使用范围.
Be careful with copying these lines from a .PDF manual. The quote is deformed to escape sequences, which cripples proper use.
这篇关于在iMac上从Emacs运行Octave的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!