启用暂存缓冲区以在 emacs-ess 中执行 R 代码
我已改用 emacs-ess 进行 R 代码开发,并且效果很好。我希望能够将一些用于调试 R 脚本的小 R 代码写入暂存缓冲区,并能够在 R 进程缓冲区中执行暂存缓冲区代码。我发现如何通过将以下内容放入 .emacs 文件中来将暂存缓冲区的模式更改为文本:
(setq initial-major-mode 'text-mode)
是否有类似的语句可以放入我的 .emacs 文件中,使暂存缓冲区具有 ess 模式?我尝试了以下操作,这导致了有关错误类型参数的错误:
(setq initial-major-mode 'ess-mode)
I have switched to using emacs-ess for my R code development and it is working great. I would like to be able to write some small R code I am using for debugging my R script into the scratch buffer, and be able to execute the scratch buffer code in the R process buffer. I've found how I could change the scratch buffer's mode to text by putting the following in the .emacs file:
(setq initial-major-mode 'text-mode)
Is there a similar statement I can put in my .emacs file that would make the scratch buffer have the ess-mode? I tried the following which results in an error about wrong type argument:
(setq initial-major-mode 'ess-mode)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你想要的是
(setq initial-major-mode 'R-mode)
。或者,您可以在暂存缓冲区中执行 Mx R 模式来更改主要模式。What you want is
(setq initial-major-mode 'R-mode)
. Alternatively, you could just do M-x R-mode when in the scratch buffer to change the major mode.