我在一个名为"X:\ alphaAndOmega\R\R"的目录中安装了R. 因此Rterm.exe(32位版本)位于"X:\ alphaAndOmega\R\R\_bin\i386"中.我知道它不是一个"标准的R目录",而且像R-3.0.0这样的"标准R目录"很容易被ESS识别(至少如果我将它们添加到Windows中的PATH变量中).
我尝试以某种方式自定义我的.emacs文件,ESS会在我的非标准目录中查找Rterm.exe,但我无法这样做.我是emacs的新手,我试着玩一些以下命令:
inferior-R-program-name 和 ess-rterm-version-paths
但我失败了.ESS找不到任何东西.
我使用emacs 24.3.1,ESS 13.05和R 2.15.目前我的.emacs文件只包含一行,所以这应该不是问题:
(require 'ess-site)
我该怎么做才能让ESS找到我的Rterm.exe?
实际上只有一个配置设置ess-site.el; 我过去曾经使用过那个.这里是来自ess-site.el但注意它被注释掉了:
;; If you wish to call other versions of R on a Unix system, ESS
;; should auto-detect other versions of R, according to matches to the
;; variable `ess-r-versions' as described in its docstring. Consider
;; changing that variable rather than changing inferior-R-program-name
;; if your version of R is not already auto-detected.
;;(setq-default inferior-R-program-name "R") ; unix systems
;;(setq-default inferior-R-program-name "Rterm") ; MS Windows, see below for path
;;(setq-default inferior-R-program-name "C:\\Program Files\\R\\R-2.5.0\\bin\\Rterm.exe")
Run Code Online (Sandbox Code Playgroud)
我刚刚检查了我的工作机器,Rterm.exe默认情况下找到了$PATH.我确实使用了Vincent Goulet的Emacs/ESS/AucTeX捆绑包,我可以全心全意地推荐它"它只是起作用".