如何使Octave的情节在emacs下工作? [英] How to get Octave's plot to work under emacs?

查看:126
本文介绍了如何使Octave的情节在emacs下工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在终端窗口中使用八度音

Using octave in a terminal window

x=1:10;
plot(x);

工作正常,生成可缩放的绘图窗口等.

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

在emacs下运行八度,会出现图,但图窗口已挂起,无法缩放.如果再次执行plot(x);,则窗口消失.

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.

我正在使用Debian Jessie,以及GNU Emacs 24.3.1和GNU Octave版本3.8.1.

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

要使其完全正常工作,我必须制作一个 .octaverc 来设置提示.

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

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

推荐答案

似乎此问题是由使用八行模式和八行模式通过无行编辑开关引起的.您可以从编译的Lisp文件中破解它,一切正常!

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!

在我的系统上:

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

直接在.elc文件中将--no-line-editing更改为--line-editing

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

重新启动emacs,一切都会好起来.

restart emacs and everything should be fine.

这篇关于如何使Octave的情节在emacs下工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆