ESS错误自动加载无法定义函数编译 - ensure-parse

时间:2015-10-01 15:16:44

标签: r emacs ess

我刚刚使用Ubuntu 12.04的软件包管理器升级到最新版本的ESS。仅Emacs似乎运行良好,但Emacs不适用于ESS(Emacs Speaks Statistics)。启动ESS后,我收到消息:

命令后挂钩错误:(错误自动加载无法定义函数编译 - 确保解析)。

我该如何解决这个问题?

以下是我简短的.emacs文件:

(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.
 '(TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi") (output-pdf "Evince") (output-html "xdg-open"))))
 '(scroll-bar-mode (quote right)))
(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.
 '(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 117 :width normal :foundry "unknown" :family "DejaVu Sans Mono")))))


;; ********* Beginning of customization ******************

;; assign word-wrapping mode
(global-visual-line-mode 1)  ; 1=on, 0=off

;; speed up function evaluation
(setq ess-eval-visibly-p nil)

;; "Set font-lock colors to Richard Heiberger's wheat color scheme."
  ;; (set-foreground-color "Black")
  ;; (set-background-color "Wheat")
  ;; (set-face-foreground 'modeline "Wheat")
  ;; (set-face-background 'modeline "Sienna")

  ;; (set-face-foreground 'font-lock-comment-face "Firebrick")
  ;; (set-face-foreground 'font-lock-function-name-face "Blue")
  ;; (set-face-foreground 'font-lock-keyword-face "Purple")
  ;; (if (eq font-lock-reference-face 'font-lock-constant-face )
  ;;     (set-face-foreground 'font-lock-constant-face "Brown")
  ;;   (set-face-foreground 'font-lock-reference-face "Brown"))
  (set-face-foreground 'font-lock-string-face "VioletRed")
  ;; (set-face-foreground 'font-lock-type-face "Sienna")
  ;; (set-face-foreground 'font-lock-variable-name-face "Black")

; count words in latex docs
(defun latex-word-count ()
  (interactive)
  (shell-command (concat "/usr/bin/texcount "
    "-inc "; texcount option (set to count documents included via \input)
    (buffer-file-name))))

; that's [ctrl-c w] as the hotkey
(global-set-key (quote [f6]) 'latex-word-count)


;; ********* End of customization ******************

1 个答案:

答案 0 :(得分:0)

几天前,我的系统上出现了完全相同的错误消息。根据{{​​3}}论坛的建议,我将Emacs 23升级到24,这解决了这个问题。显然(根据论坛),ess的许多最新功能仅适用于Emacs 24,所以如果你使用Emacs编写R代码,无论如何升级都是个好主意。