How to get Octave's plot to work under emacs?

和自甴很熟 提交于 2019-12-23 01:54:12

问题


Using octave in a terminal window

x=1:10;
plot(x);

works fine, produces a plot window which is zoomable etc.

running octave under emacs, the plot appears, but the plot window is hung and you can't zoom. If you execute plot(x); again, the window disappears.

I'm using Debian Jessie, with GNU Emacs 24.3.1 and GNU Octave, version 3.8.1.

To get it to work at all I had to make a .octaverc to set the prompt.

$ cat ~/.octaverc
PS1(">> ")

回答1:


It seems that the problem is caused by octave-mode running octave with the no-line-editing switch. You can just hack this out of the compiled lisp file and everything works fine!

On my system:

cd /usr/share/emacs/24.4/lisp/progmodes
sudo vi octave.elc

change --no-line-editing to --line-editing directly in the .elc file

restart emacs and everything should be fine.



来源:https://stackoverflow.com/questions/25436702/how-to-get-octaves-plot-to-work-under-emacs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!