4
votes

I am trying ESS (Emacs Speaks Statistics).

The problem is: Ctrl-P and the up-arrow are disabled on any buffer because of the following error:

Variable binding depth exceeds max-specpdl-size

The trigger is the following line in .emacs.el

(require 'ess-site)

This line is needed to load ESS. If I delete this line, then the problems does not happen, but, obviously, I can't use ESS.

Notes:

  • "(setq max-lisp-eval-depth 10000)" does not solve the problem.
  • "(setq max-specpdl-size 32000)" produces a different error:

    Lisp nesting exceeds `max-lisp-eval-depth'

  • When the above two settings are valid, then I get the error for max-lisp-eval-depth.

  • This problem happens before M-x R RET. For example, it happens on the scratch buffer just after emacs starts.
  • I have not found any other key with this problem. (So Ctrl-F and down-arrow are working, for example.)
  • Deleting the ESS buffer does not solve the problem.
  • The initial message on the ESS buffer is following. (I don't know, whether it is useful.)

    [ess-site.el]: ess-customize-alist=nil
    [ess-site.el 2]: ess-customize-alist=nil
    (S): ess-s-versions-create making M-x defuns for

    (R): ess-r-versions-create making M-x defuns for

Environment:

  • emacs-ess-15.03.1-1.3.noarch
  • emacs-24.3-17.2.10.x86_64
  • R-base-3.1.1-2.1.9.x86_64
  • openSUSE 13.2 (Harlequin) (x86_64)
2

2 Answers

3
votes

You could try

(setq max-specpdl-size 32000)

M-x describe-variable max-specpdl-size for some info

I've had this problem with python-mode and rope, never with ESS though.

0
votes

Solution: change the order of certain settings.

My .emacs.el has settings for smooth-scrolling (A)

(require 'smooth-scrolling)
(setq smooth-scroll-margin 5)

and for the initial file (B)

(find-file "~/init.org")

(A) should be loaded before (B). (B) was loaded before (A) in my previous .emacs.el and this causes the problem. (I do not know the precise reason for the error which I described in my question.)