From unknown Sun Aug 17 22:03:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5082 <5082@debbugs.gnu.org> To: bug#5082 <5082@debbugs.gnu.org> Subject: Status: 23.1.50; print-circle and make-hash-table Reply-To: bug#5082 <5082@debbugs.gnu.org> Date: Mon, 18 Aug 2025 05:03:08 +0000 retitle 5082 23.1.50; print-circle and make-hash-table reassign 5082 emacs submitter 5082 =E5=B7=9D=E5=B9=A1=E5=A4=AA=E4=B8=80 severity 5082 normal thanks From kawabata.taichi@gmail.com Mon Nov 30 07:09:35 2009 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 From monnier@faina.iro.umontreal.ca Mon Nov 30 13:08:41 2009 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: From unknown Sun Aug 17 22:03:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 29 Dec 2009 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator