我经常发现自己有一堆在 ESS 缓冲区中运行的 R 进程。有一个方便的 Lisp 函数ess-request-a-process
,它要求 R 进程,并将其放在前面。唯一的缺点是它以某种方式默认为S,所以每次我要进行切换时,我都必须输入R,令人作呕。
我尝试自定义ess-language
变量,但即使我将值设置为“R”,即当前会话的 4,或者即使我为将来的会话保存设置,只要我键入C-c C-k
,S就会自动再次出现。这很烦人,我真的不想以C-x C-b
想要C-s
的 R 会话结束!=)
我什至尝试设置(setq-default ess-language "R")
,.emacs
但没有运气...
顺便说一句,我在 Linux Mint 上运行 Emacs v. 23.1.1,在 Arch Linux 上运行 Emacs v. 23.2,以及 ESS v. 5.12。如果这是相关的,我会从带有-nw
参数的终端运行 Emacs。这是我的.emacs
:
;; start server
(server-start)
;; load ESS
(require 'ess-site)
(require 'ess-rutils)
;; set HTML help as default
(setq inferior-ess-r-help-command "help(\"%s\", help_type = \"html\")\n")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ess-help-kill-bogus-buffers t)
'(ess-rutils-keys nil)
'(show-paren-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(put 'upcase-region 'disabled nil)
那么......如何一劳永逸地设置R ?(我不使用 S/S+/SAS)