From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Toby Cubitt Newsgroups: gmane.emacs.devel Subject: Re: Allow value of PRINT_CIRCLE to be modified from Elisp? Date: Fri, 20 Apr 2012 00:25:13 +0200 Message-ID: <20120419222512.GA15473@c3po.home> References: Reply-To: Toby Cubitt NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1334874357 31786 80.91.229.3 (19 Apr 2012 22:25:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Apr 2012 22:25:57 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 20 00:25:53 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SKznU-0005tM-6l for ged-emacs-devel@m.gmane.org; Fri, 20 Apr 2012 00:25:52 +0200 Original-Received: from localhost ([::1]:38498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKznT-00005J-GM for ged-emacs-devel@m.gmane.org; Thu, 19 Apr 2012 18:25:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKznP-0008WT-Vw for emacs-devel@gnu.org; Thu, 19 Apr 2012 18:25:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKznM-0007kp-SQ for emacs-devel@gnu.org; Thu, 19 Apr 2012 18:25:47 -0400 Original-Received: from sanddollar.geekisp.com ([216.168.135.167]:12209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKznM-0007kU-NC for emacs-devel@gnu.org; Thu, 19 Apr 2012 18:25:44 -0400 Original-Received: (qmail 8294 invoked by uid 1003); 19 Apr 2012 22:25:42 -0000 Original-Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Thu, 19 Apr 2012 18:25:40 -0400 Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.dr-qubit.org/gpg-toby.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) X-Primary-Address: toby@dr-qubit.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 216.168.135.167 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149842 Archived-At: On Thu, Apr 19, 2012 at 06:12:15PM -0400, Stefan Monnier wrote: > > print.c defines an arbitrary fixed limit > > #define PRINT_CIRCLE 200 > > > on the depth to which a lisp object can be printed, before it bails out > > with the "Apparently circular structure being printed" error. > > > Apparently, no one anticipated wanting to print highly nested Elisp > > structures. But this arbitrary limit is breaking some of the > > functionality in Elisp packages I maintain (see below for a detailed > > explanation). > > > Could the #define PRINT_CIRCLE constant be turned into a DEFVAR_INT > > `max-lisp-print-depth' variable, so that it could be adjusted from Elisp > > when more print depth is needed? > > Maybe we should simply ignore PRINT_CIRCLE when `print-circle' is non-nil. That would definitely solve all my problems if it can be done. Toby -- Dr T. S. Cubitt Mathematics and Quantum Information group Department of Mathematics Complutense University Madrid, Spain email: tsc25@cantab.net web: www.dr-qubit.org