Emacs+ESS+R: How to have help page open in new buffer

时间:2021-02-14 22:57:31

Currently I have set options(help_type="text") and getOption("help_type") returns "text". Not sure why but R still opens a new browser window or tab when I type ?par in the inferior ESS (iESS) buffer. If I explicitly evaluate help(par,help_type="text"), the contents of the help page is printed in the iESS buffer. I thought there was a way to have the contents open in a its own separate Emacs buffer -- was I mistaken?

目前我已设置选项(help_type =“text”),getOption(“help_type”)返回“text”。不确定为什么但是当我在劣质ESS(iESS)缓冲区中键入?par时,R仍会打开一个新的浏览器窗口或选项卡。如果我明确评估帮助(par,help_type =“text”),则帮助页面的内容将打印在iESS缓冲区中。我认为有一种方法可以在一个独立的Emacs缓冲区中打开内容 - 我错了吗?

2 个解决方案

#1


4  

If (as we discovered in the comments) you set inferior-ess-help-command to "utils::help(\"%s\")\n", then the problem was resolved.

如果(正如我们在评论中发现的那样)你将inferior-ess-help-command设置为“utils :: help(\”%s \“)\ n”,那么问题就解决了。

It appeared to have been caused by another inferior-ess-help-command in the configuration file.

它似乎是由配置文件中的另一个inferior-ess-help-command引起的。

Its always a good idea to start emacs with the -nw options if you experience weird problems like this.

如果您遇到类似这样的奇怪问题,使用-nw选项启动emacs总是一个好主意。

#2


2  

In your .emacs file, include one of these two statements.

在.emacs文件中,包含这两个语句之一。

The first should open each ?foo request in it's own frame/buffer

第一个应该在它自己的帧/缓冲区中打开每个?foo请求

;;;;; create a new frame for each help instance
(setq ess-help-own-frame t)

This second version has a single buffer for all help pages you call up

第二个版本为您调用的所有帮助页面都有一个缓冲区

;;;;; If you want all help buffers to go into one frame do
(setq ess-help-own-frame 'one)

#1


4  

If (as we discovered in the comments) you set inferior-ess-help-command to "utils::help(\"%s\")\n", then the problem was resolved.

如果(正如我们在评论中发现的那样)你将inferior-ess-help-command设置为“utils :: help(\”%s \“)\ n”,那么问题就解决了。

It appeared to have been caused by another inferior-ess-help-command in the configuration file.

它似乎是由配置文件中的另一个inferior-ess-help-command引起的。

Its always a good idea to start emacs with the -nw options if you experience weird problems like this.

如果您遇到类似这样的奇怪问题,使用-nw选项启动emacs总是一个好主意。

#2


2  

In your .emacs file, include one of these two statements.

在.emacs文件中,包含这两个语句之一。

The first should open each ?foo request in it's own frame/buffer

第一个应该在它自己的帧/缓冲区中打开每个?foo请求

;;;;; create a new frame for each help instance
(setq ess-help-own-frame t)

This second version has a single buffer for all help pages you call up

第二个版本为您调用的所有帮助页面都有一个缓冲区

;;;;; If you want all help buffers to go into one frame do
(setq ess-help-own-frame 'one)