From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#5082: marked as done (23.1.50; print-circle and make-hash-table) Date: Mon, 30 Nov 2009 21:15:05 +0000 Message-ID: References: <270879b0911300709o29a12798m2ae6c6194c25e53@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1259615705-27141-0" X-Trace: ger.gmane.org 1259616528 27624 80.91.229.12 (30 Nov 2009 21:28:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 21:28:48 +0000 (UTC) To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 30 22:28:41 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 1NFDnV-0007i0-23 for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 22:28:41 +0100 Original-Received: from localhost ([127.0.0.1]:49664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFDnU-0005Rz-KV for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 16:28:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFDmP-0004rX-Hy for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 16:27:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFDmK-0004pN-Oh for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 16:27:33 -0500 Original-Received: from [199.232.76.173] (port=33476 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFDmK-0004pH-AK for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 16:27:28 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34867) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NFDmJ-0005Az-CW for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 16:27:28 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAULRN3f028126; Mon, 30 Nov 2009 13:27:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAULF5GN027183; Mon, 30 Nov 2009 13:15:05 -0800 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 5082 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:33087 Archived-At: This is a multi-part message in MIME format... ------------=_1259615705-27141-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 30 Nov 2009 16:08:38 -0500 with message-id and subject line Re: bug#5082: 23.1.50; print-circle and make-hash-table has caused the Emacs bug report #5082, regarding 23.1.50; print-circle and make-hash-table to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 5082: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D5082 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1259615705-27141-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 30 Nov 2009 15:09:35 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=AWL,GMAIL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAUF9Y0X021448 for ; Mon, 30 Nov 2009 07:09:35 -0800 Received: from mx10.gnu.org ([199.232.76.166]:45564) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1NF7sb-0001BP-1H for emacs-pretest-bug@gnu.org; Mon, 30 Nov 2009 10:09:33 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NF7sa-000360-Fh for emacs-pretest-bug@gnu.org; Mon, 30 Nov 2009 10:09:33 -0500 Received: from mail-bw0-f215.google.com ([209.85.218.215]:58726) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NF7sa-00035o-5I for emacs-pretest-bug@gnu.org; Mon, 30 Nov 2009 10:09:32 -0500 Received: by bwz7 with SMTP id 7so2103178bwz.26 for ; Mon, 30 Nov 2009 07:09:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=OFRdpCAbDWfJY30h8EGDVQvwJ/4/+5gXb1zCde40aio=; b=u4a3D5idnnUWzPYF3JGklPPIA7zTWhRjklN/dRzMONL9vLq3M6H3+kEUsdmqZvuz45 yOroQxsemX7wya7TSer2d0YZF2Q0VrdoQmo+ZaEWu4/9Vm+NQl58/06TQXCyBxsae5gH 3Cie0g/x+6KHSCZx61waslnCK0Feq5lzAo980= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=x7ZFHird/cEa8gBQiiWaYEdUmTU4cVpfM9l6cK8djtIE9H+ZX6wR/kZM69VZMwDdp2 GGSvyXj47DKT76k1IZxhg8a0CDXwvONn2giSBrvzGbK2TIOvkDRn1vjPTBxsMWOLNo1q OQ2Xo+MDLYaBTXRVqeq+oxdraxlyctKurNHJA= MIME-Version: 1.0 Received: by 10.204.148.71 with SMTP id o7mr748252bkv.144.1259593770264; Mon, 30 Nov 2009 07:09:30 -0800 (PST) Date: Tue, 1 Dec 2009 00:09:30 +0900 Message-ID: <270879b0911300709o29a12798m2ae6c6194c25e53@mail.gmail.com> Subject: 23.1.50; print-circle and make-hash-table From: =?ISO-2022-JP?B?GyRCQG5IKEJAMGwbKEI=?= To: emacs-pretest-bug@gnu.org Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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 Cordially Yours, -- ---------------------------------------------------------------------  KAWABATA, Taichi   E-mail: kawabata.taichi@gmail.com ------------=_1259615705-27141-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5082-done) by emacsbugs.donarmstrong.com; 30 Nov 2009 21:08:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAUL8dlK026683 for <5082-done@emacsbugs.donarmstrong.com>; Mon, 30 Nov 2009 13:08:41 -0800 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nAUL8cEc029407; Mon, 30 Nov 2009 16:08:39 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id D91E93A280; Mon, 30 Nov 2009 16:08:38 -0500 (EST) From: Stefan Monnier To: =?utf-8?B?5bed5bmh5aSq5LiA?= Subject: Re: bug#5082: 23.1.50; print-circle and make-hash-table Message-ID: References: <270879b0911300709o29a12798m2ae6c6194c25e53@mail.gmail.com> Date: Mon, 30 Nov 2009 16:08:38 -0500 In-Reply-To: <270879b0911300709o29a12798m2ae6c6194c25e53@mail.gmail.com> (=?utf-8?B?IuW3neW5oQnlpKrkuIAiJ3M=?= message of "Tue, 1 Dec 2009 00:09:30 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3417=0 > 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. Thanks for catching this bug and for the clear testcase. I've installed the patch below which should fix it. Stefan === modified file 'src/print.c' --- src/print.c 2009-11-24 15:30:54 +0000 +++ src/print.c 2009-11-30 21:03:36 +0000 @@ -1420,6 +1420,13 @@ size &= PSEUDOVECTOR_SIZE_MASK; for (i = 0; i < size; i++) print_preprocess (XVECTOR (obj)->contents[i]); + if (HASH_TABLE_P (obj)) + { /* For hash tables, the key_and_value slot is past + `size' because it needs to be marked specially in case + the table is weak. */ + struct Lisp_Hash_Table *h = XHASH_TABLE (obj); + print_preprocess (h->key_and_value); + } break; default: ------------=_1259615705-27141-0--