Discussion:
Lisp nesting exceeds `max-lisp-eval-depth'
(too old to reply)
Cecil Westerhof
2010-05-04 09:01:00 UTC
Permalink
Sometimes I get:
tramp-tramp-file-p: Lisp nesting exceeds `max-lisp-eval-depth'

The only solution is to quit and restart Emacs.

This happens when I have been using Emacs for some time. Is there a way
to find out what is happening and mend the problem? For example when
this happens I cannot quit Gnus, which is not nice.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Jeff Clough
2010-05-04 10:20:53 UTC
Permalink
Post by Cecil Westerhof
tramp-tramp-file-p: Lisp nesting exceeds `max-lisp-eval-depth'
The only solution is to quit and restart Emacs.
This happens when I have been using Emacs for some time. Is there a way
to find out what is happening and mend the problem? For example when
this happens I cannot quit Gnus, which is not nice.
That variable is set to 400 by default (if I recall correctly), and a
suggestion in the Lisp Intro manual is to set it to something much
higher. In my .emacs, I have:

(setq max-lisp-eval-depth 12000)

This may be all you need.

Jeff
Cecil Westerhof
2010-05-04 10:48:57 UTC
Permalink
Post by Jeff Clough
Post by Cecil Westerhof
tramp-tramp-file-p: Lisp nesting exceeds `max-lisp-eval-depth'
The only solution is to quit and restart Emacs.
This happens when I have been using Emacs for some time. Is there a way
to find out what is happening and mend the problem? For example when
this happens I cannot quit Gnus, which is not nice.
That variable is set to 400 by default (if I recall correctly), and a
suggestion in the Lisp Intro manual is to set it to something much
(setq max-lisp-eval-depth 12000)
Correct, the default is 400. But I remember also that it is said not to
increase it, because you can run out of stack space. But with the
computers we use nowadays that will not be a problem properly. The
problem I have with it is that it is a workaround instead of a solution.
Of course I can use it when I want to leave Gnus correctly. ;-}
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Jeff Clough
2010-05-04 11:23:06 UTC
Permalink
Post by Cecil Westerhof
Post by Jeff Clough
Post by Cecil Westerhof
tramp-tramp-file-p: Lisp nesting exceeds `max-lisp-eval-depth'
The only solution is to quit and restart Emacs.
This happens when I have been using Emacs for some time. Is there a way
to find out what is happening and mend the problem? For example when
this happens I cannot quit Gnus, which is not nice.
That variable is set to 400 by default (if I recall correctly), and a
suggestion in the Lisp Intro manual is to set it to something much
(setq max-lisp-eval-depth 12000)
Correct, the default is 400. But I remember also that it is said not to
increase it, because you can run out of stack space. But with the
computers we use nowadays that will not be a problem properly. The
problem I have with it is that it is a workaround instead of a solution.
Of course I can use it when I want to leave Gnus correctly. ;-}
Hopefully someone familiar with tramp can help you determine if this is
a bug or what, precisely, is going on. That said, bumping the limit is
still something to consider as more than just a workaround to this
problem. I hunted up the reference in the Lisp Intro to clarify:

"You can write recursive functions to be frugal or wasteful of mental or
computer resources; as it happens, methods that people find easy—that
are frugal of ‘mental resources’—sometimes use considerable computer
resources. Emacs was designed to run on machines that we now consider
limited and its default settings are conservative. You may want to
increase the values of max-specpdl-size and max-lisp-eval-depth. In my
‘.emacs’ file, I set them to 15 and 30 times their default value."

For what it's worth.

Jeff
Cecil Westerhof
2010-05-04 12:15:10 UTC
Permalink
Post by Jeff Clough
Post by Cecil Westerhof
tramp-tramp-file-p: Lisp nesting exceeds `max-lisp-eval-depth'
I am not sure it has always to do with tramp. This was the message I got
today. So maybe it has been something else also.
Post by Jeff Clough
Post by Cecil Westerhof
The only solution is to quit and restart Emacs.
This happens when I have been using Emacs for some time. Is there a way
to find out what is happening and mend the problem? For example when
this happens I cannot quit Gnus, which is not nice.
Maybe good to mention also. I have the feeling that it mostly happens
when I have been playing with my configuration. (I have lately been
playing a lot with .gnus.) Again: I am not sure, but it feels like this.
So it is possible that the error is not in tramp, but has to do with
something I have done.
Post by Jeff Clough
Hopefully someone familiar with tramp can help you determine if this is
a bug or what, precisely, is going on. That said, bumping the limit is
still something to consider as more than just a workaround to this
"You can write recursive functions to be frugal or wasteful of mental or
computer resources; as it happens, methods that people find easy—that
are frugal of ‘mental resources’—sometimes use considerable computer
resources. Emacs was designed to run on machines that we now consider
limited and its default settings are conservative. You may want to
increase the values of max-specpdl-size and max-lisp-eval-depth. In my
‘.emacs’ file, I set them to 15 and 30 times their default value."
Because it first does not happen and later it does, I have the feeling
that there is somewhere a bug. (Maybe introduced by me.) Because Emacs
can run 'indefinitely', it is something that will still happen. But if
it changes from once a month to once a year, that would be a big
advantage. (And the possibility that Emacs will run for a year is very
slim.)
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Cecil Westerhof
2010-05-05 12:26:22 UTC
Permalink
Post by Jeff Clough
Post by Cecil Westerhof
Post by Jeff Clough
Post by Cecil Westerhof
tramp-tramp-file-p: Lisp nesting exceeds `max-lisp-eval-depth'
The only solution is to quit and restart Emacs.
This happens when I have been using Emacs for some time. Is there a way
to find out what is happening and mend the problem? For example when
this happens I cannot quit Gnus, which is not nice.
That variable is set to 400 by default (if I recall correctly), and a
suggestion in the Lisp Intro manual is to set it to something much
(setq max-lisp-eval-depth 12000)
Correct, the default is 400. But I remember also that it is said not to
increase it, because you can run out of stack space. But with the
computers we use nowadays that will not be a problem properly. The
problem I have with it is that it is a workaround instead of a solution.
Of course I can use it when I want to leave Gnus correctly. ;-}
Hopefully someone familiar with tramp can help you determine if this is
a bug or what, precisely, is going on. That said, bumping the limit is
still something to consider as more than just a workaround to this
There is a real problem. It just happened again. I wanted to do a
follow-up in Gnus and it went wrong again. (Has nothing to do with tramp
as far as I know, but the message is the same.)

I could not leave Gnus, so I started changing max-lisp-eval-depth.
First I set max-lisp-eval-depth to 800.
This was not enough.
I changed it to 4.000.
Now I got a message about max-specpdl-size. I changed it from 1.640 to
8.000.
I changed max-lisp-eval-depth to 6.000. I could still not leave Gnus, so
I changed it to 40.000.
Then I got again the message about max-specpdl-size. I changed it to
80.000 and now I could leave Gnus, but shortly after this Emacs crashed.

So I think my earlier hunch about that it could be linked to changing
the configuration is properly wrong. It properly has to do with tramp.
When I had much longer sessions, I was not using tramp.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Loading...