From unknown Sun Aug 17 04:16:13 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#6017 <6017@debbugs.gnu.org> To: bug#6017 <6017@debbugs.gnu.org> Subject: Status: 23.1.96; savehist-printable for hash tables Reply-To: bug#6017 <6017@debbugs.gnu.org> Date: Sun, 17 Aug 2025 11:16:13 +0000 retitle 6017 23.1.96; savehist-printable for hash tables reassign 6017 emacs submitter 6017 "Drew Adams" severity 6017 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 23 13:51:32 2010 Received: (at submit) by debbugs.gnu.org; 23 Apr 2010 17:51:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5N2K-0005vf-BM for submit@debbugs.gnu.org; Fri, 23 Apr 2010 13:51:32 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5N2I-0005vW-6Z for submit@debbugs.gnu.org; Fri, 23 Apr 2010 13:51:30 -0400 Received: from lists.gnu.org ([199.232.76.165]:57443) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O5N2D-0002Jk-HA for submit@debbugs.gnu.org; Fri, 23 Apr 2010 13:51:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5N2D-0005AO-56 for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2010 13:51:25 -0400 Received: from [140.186.70.92] (port=57476 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5N29-000583-Qm for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2010 13:51:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5N22-0000Ge-Jc for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2010 13:51:20 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:61300) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5N22-0000GX-8W for bug-gnu-emacs@gnu.org; Fri, 23 Apr 2010 13:51:14 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3NHp5ko008789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Apr 2010 17:51:09 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3NHTIAK005900 for ; Fri, 23 Apr 2010 17:51:04 GMT Received: from abhmt002.oracle.com by acsmt355.oracle.com with ESMTP id 203651851272044959; Fri, 23 Apr 2010 10:49:19 -0700 Received: from dradamslap1 (/10.175.223.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Apr 2010 10:49:19 -0700 From: "Drew Adams" To: Subject: 23.1.96; savehist-printable for hash tables Date: Fri, 23 Apr 2010 10:49:22 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcrjDU66KSXh0D1mQMi2Mbl849MU/g== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Auth-Type: Internal IP X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-CT-RefId: str=0001.0A090203.4BD1DE0F.0057:SCFMA4539811,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) IIUC, starting with Emacs 23.2, we can prin1 and read hash tables. If that's correct, then `savehist-printable' could presumably be updated to add this sexp to the cond: (hash-table-p value). IOW: (defun savehist-printable (value) "Return non-nil if VALUE is printable." (cond ((stringp value)) ((numberp value)) ((symbolp value)) ((hash-table-p value)) (t (with-temp-buffer (condition-case nil (let ((print-readably t) (print-level nil)) (prin1 value (current-buffer)) (read (point-min-marker)) t) (error nil)))))) In GNU Emacs 23.1.96.1 (i386-mingw-nt5.1.2600) of 2010-04-20 on G41R2F1 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/xpm/include' From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 23 14:25:53 2010 Received: (at 6017) by debbugs.gnu.org; 23 Apr 2010 18:25:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5NZZ-0006JI-7S for submit@debbugs.gnu.org; Fri, 23 Apr 2010 14:25:53 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5NZX-0006JA-5R for 6017@debbugs.gnu.org; Fri, 23 Apr 2010 14:25:51 -0400 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 o3NIPjBq013668; Fri, 23 Apr 2010 14:25:45 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id CB8E7B411D; Fri, 23 Apr 2010 14:15:45 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#6017: 23.1.96; savehist-printable for hash tables Message-ID: References: Date: Fri, 23 Apr 2010 14:15:45 -0400 In-Reply-To: (Drew Adams's message of "Fri, 23 Apr 2010 10:49:22 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.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 RV3520=0 X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6017 Cc: 6017@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > IIUC, starting with Emacs 23.2, we can prin1 and read hash tables. If > that's correct, then `savehist-printable' could presumably be updated to > add this sexp to the cond: (hash-table-p value). IOW: > (defun savehist-printable (value) > "Return non-nil if VALUE is printable." > (cond > ((stringp value)) > ((numberp value)) > ((symbolp value)) > ((hash-table-p value)) > (t > (with-temp-buffer > (condition-case nil > (let ((print-readably t) (print-level nil)) > (prin1 value (current-buffer)) > (read (point-min-marker)) > t) > (error nil)))))) That won't check whether the contents of the has-table are themsevles printable. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 23 14:35:37 2010 Received: (at 6017) by debbugs.gnu.org; 23 Apr 2010 18:35:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5Nix-0006P6-Si for submit@debbugs.gnu.org; Fri, 23 Apr 2010 14:35:36 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5Niw-0006Oz-FJ for 6017@debbugs.gnu.org; Fri, 23 Apr 2010 14:35:34 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3NIZRsa005527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 23 Apr 2010 18:35:29 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3NIULGW018816; Fri, 23 Apr 2010 18:35:26 GMT Received: from abhmt016.oracle.com by acsmt354.oracle.com with ESMTP id 203786251272047691; Fri, 23 Apr 2010 11:34:51 -0700 Received: from dradamslap1 (/10.175.223.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Apr 2010 11:34:51 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: Subject: RE: bug#6017: 23.1.96; savehist-printable for hash tables Date: Fri, 23 Apr 2010 11:34:55 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcrjEmqMrSOP5SjGS/mggYCJ4+DrggAAM87g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090209.4BD1E871.009F:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 6017 Cc: 6017@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) > That won't check whether the contents of the has-table are > themsevles printable. Good point. I don't know how the support for printing & reading hash tables works. If it just ensures that the top level is readable (the hash table itself), then yes, there is no guarantee that its content is really readable. Is this feature of hash-table print+read support specified anywhere, so we know what the support really is? If not, could you please document it? It sounds like it is similar to printing a list - no guarantees about readability of list members etc. If so, we should at least say that somewhere. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 25 14:30:54 2010 Received: (at 6017-done) by debbugs.gnu.org; 25 Apr 2010 18:30:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O66bW-0006dk-3k for submit@debbugs.gnu.org; Sun, 25 Apr 2010 14:30:54 -0400 Received: from pantheon-po15.its.yale.edu ([130.132.50.71]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O66bT-0006dd-RB for 6017-done@debbugs.gnu.org; Sun, 25 Apr 2010 14:30:52 -0400 Received: from furry (bordersgroupinc-gw.customer.alter.net [157.130.220.18] (may be forged)) (authenticated bits=0) by pantheon-po15.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o3PIUcgW006604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 25 Apr 2010 14:30:46 -0400 Received: by furry (Postfix, from userid 1000) id D171BC055; Sun, 25 Apr 2010 14:30:35 -0400 (EDT) From: Chong Yidong To: "Drew Adams" Subject: Re: bug#6017: 23.1.96; savehist-printable for hash tables References: Date: Sun, 25 Apr 2010 14:30:35 -0400 In-Reply-To: (Drew Adams's message of "Fri, 23 Apr 2010 11:34:55 -0700") Message-ID: <87bpd78jw4.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 6017-done Cc: 6017-done@debbugs.gnu.org, 'Stefan Monnier' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) "Drew Adams" writes: > Is this feature of hash-table print+read support specified anywhere, > so we know what the support really is? If not, could you please > document it? See `Creating Hash Tables' in the Lisp manual. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 25 15:00:19 2010 Received: (at 6017-done) by debbugs.gnu.org; 25 Apr 2010 19:00:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O673z-0007TK-IG for submit@debbugs.gnu.org; Sun, 25 Apr 2010 15:00:19 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O673x-0007TC-Kx for 6017-done@debbugs.gnu.org; Sun, 25 Apr 2010 15:00:18 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3PJ0AfN005986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 25 Apr 2010 19:00:12 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3PDrnaJ008157; Sun, 25 Apr 2010 19:00:09 GMT Received: from abhmt009.oracle.com by acsmt354.oracle.com with ESMTP id 187794151272221976; Sun, 25 Apr 2010 11:59:36 -0700 Received: from dradamslap1 (/10.175.226.51) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 25 Apr 2010 11:59:36 -0700 From: "Drew Adams" To: "'Chong Yidong'" References: <87bpd78jw4.fsf@stupidchicken.com> Subject: RE: bug#6017: 23.1.96; savehist-printable for hash tables Date: Sun, 25 Apr 2010 11:59:45 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87bpd78jw4.fsf@stupidchicken.com> Thread-Index: AcrkpXIwwfzh2EDFTm621O504B8imgAA+xsw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090208.4BD4913C.00C8:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 6017-done Cc: 6017-done@debbugs.gnu.org, 'Stefan Monnier' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) > > Is this feature of hash-table print+read support specified anywhere, > > so we know what the support really is? If not, could you please > > document it? > > See `Creating Hash Tables' in the Lisp manual. That explanation seems clear and complete. Thx. From unknown Sun Aug 17 04:16:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 24 May 2010 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator