bread wrote:
> I'm now using the latest semantic from CVS and found the error below:
>
> Save Error: "Apparently circular structure being printed":
> /home/bread/.emacs.d/semantic_cache/!home!bread!jeda!RSG_ITG!include!boost!preprocessor!seq!semantic.cache
> [2 times]
In case it helps, I recently saw this very same error with my ternary
search tree package. The problem is that the print.c file in the Emacs
source code sets a hard-coded limit of 200 on the depth of any lisp
structure being printed, before assuming that the structure it's trying
to print is circular, and throwing this error.
Unlike various other safe-guards and limits in Emacs, there seems to be
absolutely no way of changing this PRINT_CIRCLE limit from within Elisp.
It's a #define in print.c and is hard-coded at compile-time.
It's possible that semantic really is trying to print a circular
structure, which would be a bug in semantic. But it's more likely that
semantic is simply trying to print a non-circular lisp structure that
happens to have a depth greater than 200.
This isn't exactly an Emacs bug, because the limit is working as
intended. But it is an Emacs issue. A work-around is to increase the
PRINT_CIRCLE limit and recompile Emacs from source. I've attached a
patch that does this.
If applying the patch and recompiling makes the error go away, then let
us know. If enough Elisp packages hit this issue, we might persuade the
Emacs devs to either increase the value of PRINT_CIRCLE in mainline
Emacs, or, better still, make it set-able from Elisp like other limits.
A quick Google reveals that the EDB package has also hit this issue in
the past, so that makes at least three packages that this affects...
Toby
|