From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: bug#5082: 23.1.50; print-circle and make-hash-table Date: Wed, 2 Dec 2009 16:19:09 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <873a3thvdu.fsf@lifelogs.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1259797014 10966 80.91.229.12 (2 Dec 2009 23:36:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Dec 2009 23:36:54 +0000 (UTC) Cc: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 03 00:36:47 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NFykY-0002TV-VT for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2009 00:36:47 +0100 Original-Received: from localhost ([127.0.0.1]:46122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFykY-00079x-KK for ged-emacs-devel@m.gmane.org; Wed, 02 Dec 2009 18:36:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFxXf-0006Tv-5T for emacs-devel@gnu.org; Wed, 02 Dec 2009 17:19:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFxXY-0006L4-Lm for emacs-devel@gnu.org; Wed, 02 Dec 2009 17:19:22 -0500 Original-Received: from [199.232.76.173] (port=56938 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFxXY-0006Kw-Fa for emacs-devel@gnu.org; Wed, 02 Dec 2009 17:19:16 -0500 Original-Received: from chirelay1o.jumptrading.com ([38.98.147.153]:59941 helo=chirelay1.jumptrading.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFxXY-0002gB-3Y for emacs-devel@gnu.org; Wed, 02 Dec 2009 17:19:16 -0500 Original-Received: from chirelay1.jumptrading.com (unknown [127.0.0.1]) by chirelay1.jumptrading.com (Symantec Mail Security) with ESMTP id 67FF5320008 for ; Wed, 2 Dec 2009 16:13:23 -0600 (CST) X-AuditID: 26629395-a4359bb000005e11-9a-4b16e68339d5 Original-Received: from chiexchange02.w2k.jumptrading.com (unknown [38.98.147.140]) by chirelay1.jumptrading.com (Symantec Mail Security) with ESMTP id 390692DC109 for ; Wed, 2 Dec 2009 16:13:23 -0600 (CST) Original-Received: from internalsmtp.w2k.jumptrading.com (10.2.4.29) by chiexchange02.w2k.jumptrading.com (10.2.4.71) with Microsoft SMTP Server id 8.1.291.1; Wed, 2 Dec 2009 16:19:12 -0600 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com ([10.2.13.58]) by internalsmtp.w2k.jumptrading.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 2 Dec 2009 16:19:12 -0600 Original-Newsgroups: gnu.emacs.bug 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" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:FF4daTYn3VRbpCTZHhbMkVhbsfw= In-Reply-To: (=?utf-8?B?IuW3neW5oeWkquS4gA==?= "'s message of "Tue, 1 Dec 2009 00:09:30 +0900") Posted-To: gnu.emacs.bug X-OriginalArrivalTime: 02 Dec 2009 22:19:12.0142 (UTC) FILETIME=[79A55AE0:01CA739D] X-Brightmail-Tracker: AAAAAA== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118157 Archived-At: The following message is a courtesy copy of an article that has been posted to gnu.emacs.bug as well. On Tue, 1 Dec 2009 00:09:30 +0900 =E5=B7=9D=E5=B9=A1=E5=A4=AA=E4=B8=80 wrote:=20 > 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=3D 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=3D 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 th= at > 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=3D(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