【问题标题】:Emacs ESS error ess-toggle-S-assign wrong number of argumentsEmacs ESS 错误 ess-toggle-S-assign 错误数量的参数
【发布时间】:2018-11-29 23:37:07
【问题描述】:

在新机器上安装 Emacs 和 Emacs Speaks Statistics (ESS) 后,我在打开 R 缓冲区时收到以下错误:ess-toggle-S-assign wrong number of arguments。我相信这是由于我的.emacs 文件中的以下部分,我将分配键从_ 重新分配到;,如下所示。为什么我的.emacs 文件不再有效?

;; ESS hook additions.  Note that the duplicate calls to `(ess-toggle-S-assign
;; nil)` are correct: the first call clears the default `ess-smart-S-assign`
;; assignment and the second line re-assigns it to the customized setting.
(add-hook 'ess-mode-hook
      (lambda ()
        (setq ess-smart-S-assign-key ";")  ; reassign ' <- ' to ';'
        (ess-toggle-S-assign nil)          ; see above comment
        (ess-toggle-S-assign nil)))        ; see above comment

【问题讨论】:

    标签: ess


    【解决方案1】:

    根据 ESS 文档https://ess.r-project.org/Manual/ess.html#New-features

    对 ess-smart-S-assign-key 的自定义进行了重新设计。您现在应该在加载 ESS 之前设置该值。

    所以要像以前一样重新分配分配键,只需从 ESS 模式挂钩中删除现有的代码行,而是在您的 .emacs 文件中包含以下行。

    (setq ess-smart-S-assign-key ";")
    (require 'ess-site)
    

    【讨论】:

      猜你喜欢
      • 2014-12-31
      • 1970-01-01
      • 2023-04-01
      • 1970-01-01
      • 2018-06-02
      • 1970-01-01
      • 2019-05-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多