问题
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