GNU bug report logs - #6017
23.1.96; savehist-printable for hash tables

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 23 Apr 2010 17:52:01 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Drew Adams" <drew.adams <at> oracle.com>
Subject: bug#6017: closed (Re: bug#6017: 23.1.96; savehist-printable for
 hash tables)
Date: Sun, 25 Apr 2010 18:31:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#6017: 23.1.96; savehist-printable for hash tables

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 6017 <at> debbugs.gnu.org.

-- 
6017: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6017
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 6017-done <at> debbugs.gnu.org, 'Stefan Monnier' <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#6017: 23.1.96; savehist-printable for hash tables
Date: Sun, 25 Apr 2010 14:30:35 -0400
"Drew Adams" <drew.adams <at> oracle.com> 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.


[Message part 3 (message/rfc822, inline)]
From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 23.1.96; savehist-printable for hash tables
Date: Fri, 23 Apr 2010 10:49:22 -0700
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'
 





This bug report was last modified 15 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.