繁体   English   中英

Emacs org-mode gnuplot:运行计时器时出错:(void-variable data-file)

[英]Emacs org-mode gnuplot : Error running timer: (void-variable data-file)

每当我在emacs org-mode中调用命令org-plot/gnuplot时,我得到相同的错误Error running timer: (void-variable data-file) 我在Debian Jessie中使用emacs 24.4.1以及在Mac Os上使用emacs 24.5。 两个系统都有一个gnuplot的工作版本。 我甚至在运行没有.emacs文件的emacs时尝试此命令,但仍然会收到同样的错误。

这是一个错误。 函数org-plot / gnuplot(在org-plot.el中)尚未更新以考虑词法范围的变量。 你可以通过首先找到org-plot.el源文件来修复你的emacs安装(假设安装了.el文件)(一种方法是做)

m-x apropos ^org-plot/gnuplot$ 

然后单击结果顶部的文件链接并替换org-plot / gnuplot函数中的最后一个表达式(使用cmf快速结束)

(run-with-idle-timer 0.1 nil (lambda () (delete-file data-file)))

改为阅读

(run-with-idle-timer 0.1 nil (lambda (data-file) (delete-file data-file)) data-file)

原始代码期望lambda关闭动态数据文件变量,但它现在是词法。 我的替换代码将值直接传递给lambda。

您必须保存修改后的文件,然后重新编译它

m-x byte-compile-file

或者您只是看到.el文件较新的警告(但它会使用旧代码加载.elc)。

如果在较新版本的组织中修复此问题,我不会感到惊讶,但我没有检查过。

编辑:找到它! 请参阅以下原始答案。 在其中,我找到了引用data-file 围绕该行的原始源文件中的注释提到了更改以适应gnuplot 4.这与@ vu-nguyen的注释一起促使我下载并编译gnuplot 4.6.7

我编译并安装它:

./configure --with-cwdrc --with-readline=gnu --enable-backwards-compatibility
make
sudo make install

它开始工作了。

原始答案

我删除了我的elpa文件夹并重新安装了我的elpa软件包,以确保我没有使用“脏”软件包文件夹。 编辑:我甚至卸载了最新版本的gnuplot软件包并安装了旧版本( 201403170.6.6 ),但没有任何帮助。

它看起来像是谈论data-file的唯一包是gnuplot:

gnuplot.el:2820: ("(gnuplot)data-file" nil "[_a-zA-Z0-9]+")

也许这是一个错误?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM