Skip to content

lisp exceeds `max-lisp-eval-depth' #64

@yizhang-yiz

Description

@yizhang-yiz

Summary

It was driving me nuts and took me a while to narrow down to stan-mode but I'm still not 100% sure it's the cause of c++-mode losing all the highlighting and prompting

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

How to reproduce

use clean emacs init

rm -rf ~/.emacs.d; mkdir ~/.emacs.d

Add a minimalist init to ~/.emacs.d:

;; init.el

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)

Test emacs with a c++ header

I use the following to test

// debug.cpp
#ifndef STAN_MATH_EVENT_HPP
#define STAN_MATH_EVENT_HPP

#include <stan/math/typedefs.hpp>
#include <stan/math/dsolve/ode_integrator.hpp>
#include <stan/math/mpi/precomputed_gradients.hpp>
#include <stan/math/model_solve.hpp>
#include<vector>

The file should be displayed normally:
Screen Shot 2021-01-29 at 1 22 35 PM

add stan-mode

M-x package-install RET stan-mode
close & reopen emacs.

Open a stan model

I use the vanilla bernoulli.stan
Screen Shot 2021-01-29 at 1 27 07 PM

open the c++ file and edit

Now open that c++ file and try to edit. For example, when I insert space, I'm getting (note the mini buffer)
Screen Shot 2021-01-29 at 1 25 34 PM
and now if I close that file and reopen it, all highlighting is gone
Screen Shot 2021-01-29 at 1 29 54 PM

OS

OS: mac os x 10.14.6 (18G7016)
Emacs: all 26.1-27.1 builds from https://emacsformacosx.com/builds

If I use builds from
https://vigou3.gitlab.io/emacs-modified-macos/
with same init.el and stan-mode installed when openning a stan file I'm getting
Screen Shot 2021-01-29 at 1 35 50 PM
and I'm assuming they are caused by a same issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions