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

Hi,
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]
It seems that an error occur when semantic analyzes boost library. Actually
this error showed up to me every several seconds, so the *Message* buffer is
filled with it now.
I grepep this sentence and found it was not related to semantic itself, it
is related to Emacs (maybe edebug.elc or cust-print.elc?). So i just want to
know that is this is semantic's bug or Semantic's bug. And can this be
fixed?
Thank you very much.
--
Zhiqiu Kong (孔直秋)
EDA Labs
Dept. Computer Science & Technology
Tsinghua University
P.R China
100084