From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: Re: bug#5082: 23.1.50; print-circle and make-hash-table Date: Wed, 02 Dec 2009 16:19:09 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <873a3thvdu.fsf__31592.8866890774$1259797985$gmane$org@lifelogs.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1259797985 21249 80.91.229.12 (2 Dec 2009 23:53:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Dec 2009 23:53:05 +0000 (UTC) Cc: Emacs Development To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 03 00:52:58 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NFz0C-0000cu-Rm for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Dec 2009 00:52:57 +0100 Original-Received: from localhost ([127.0.0.1]:47040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFz0C-0005Uf-Nm for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Dec 2009 18:52:56 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!news.mixmin.net!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 44 Original-X-Trace: news.albasani.net 4s+VCRnvLQXqJX/hlNUjeCtlMLikEnp1EkRHN7dgsC5Xs71qJur5uBDdfeuRvTCuK/ziUJnmLnvhW35eaRYEWNNYp6gZRRXdL9lx0Vx1IBcHOSmh6dXkpzMl5iw1uE/w Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Wed, 2 Dec 2009 22:19:10 +0000 (UTC) X-User-ID: xHA3iKIQwD1nq5PSOFtjTLLkmwTHkmIj81XnYs1+WHA= X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:FF4daTYn3VRbpCTZHhbMkVhbsfw= sha1:XTRLrD4Nuy1DyYfNv1idyfsDv78= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) X-NNTP-Posting-Host: 9vR7i9VDG6o18Q1oqQPZdTnXTH9AVSLHOcAuQKErH/U= Original-Xref: news.stanford.edu gnu.emacs.bug:61540 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33153 Archived-At: On Tue, 1 Dec 2009 00:09:30 +0900 川幡太一 wrote: > Dear Emacs Developers, > I've found an Emacs behavior that seems a bug concerning to `print-circle' > and make-hash-table, so I would like to report it. > By setting `print-circle' to `t', printing Lisp Object with recursive > or repetitive > list should be displayed as #N= and #N# syntax. > However, it seems this is not true when printing lisp objects within > hash tables > (which become possible in Emacs 23.1.50.) Following is an example. > Is it possible to display the repetitive lisp object within printed hash tables > by #N= and #N# syntax, when `print-circle' is set to `t'? > I notify this behavior as a bug, but it may not be so. I apologize in that > case. > (let ((print-circle t) > (x (list 10 20)) > (y (make-hash-table))) > (insert (format "%S\n" (list x x))) > (puthash 1 x y) > (puthash 2 x y) > (insert (format "%S\n" y)) > (setcar x 3) > (insert (format "%S\n" y))) > Result: (#1=(10 20) #1#) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (1 (10 20) 2 (10 20))) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data (1 (3 20) 2 (3 20))) > nil I looked at the source in src/print.c. At the print_object() level the behavior is correct for lists but fiendishly complicated so I couldn't figure out the parallel structure for hashtables quickly. I'll put it on my TODO list if no one else is interested. Ted