From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 02:57:18 2013 Received: (at submit) by debbugs.gnu.org; 26 Aug 2013 06:57:19 +0000 Received: from localhost ([127.0.0.1]:56086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VDqjl-00032Q-6v for submit@debbugs.gnu.org; Mon, 26 Aug 2013 02:57:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50235) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VDp0D-0000BE-SN for submit@debbugs.gnu.org; Mon, 26 Aug 2013 01:06:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDp07-0007eY-Nw for submit@debbugs.gnu.org; Mon, 26 Aug 2013 01:06:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDp07-0007eS-KO for submit@debbugs.gnu.org; Mon, 26 Aug 2013 01:06:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDp02-0005fL-Au for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2013 01:06:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDozx-0007dO-6g for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2013 01:05:58 -0400 Received: from mail.nullprogram.com ([192.241.191.137]:49418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDozx-0007cl-2S for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2013 01:05:53 -0400 Received: from localhost ([127.0.0.1] helo=susie.zeus.nullprogram.com) by mail.nullprogram.com with esmtp (Exim 4.80) (envelope-from ) id 1VDozo-0001My-EW; Mon, 26 Aug 2013 05:05:47 +0000 From: Christopher Wellons To: bug-gnu-emacs@gnu.org Subject: 24.3; Reader error when combining print-circle and hash tables User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Mon, 26 Aug 2013 01:05:35 -0400 Message-ID: <87haed11pc.fsf@susie.zeus.nullprogram.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 26 Aug 2013 02:57:12 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) I'm running into an issue in Emacs 24.3 where the lisp reader fails to parse hash tables printed with print-circle set to t. (let ((print-circle t) (table (make-hash-table))) (puthash t table table) ; recursive (read-from-string (prin1-to-string table))) ;; => sequencep error! Or more succinctly: (read-from-string "#1=#s(hash-table)") The same error occurs not just with a direct reference, but also if the hash table is anywhere inside a referenced data structure. (read-from-string "#1=[#s(hash-table)]") (read-from-string "#1=(#s(hash-table))") I came across this problem trying to store a set of circular-referenced hash tables to a file. In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.2) of 2013-06-25 on sochi, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11204000 System Description: Debian GNU/Linux unstable (sid) Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'LDFLAGS=-Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Message Minor modes in effect: shell-dirtrack-mode: t mml-mode: t diff-auto-refine-mode: t yas-global-mode: t yas-minor-mode: t ido-ubiquitous-mode: t ido-everywhere: t show-paren-mode: t winner-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t auto-fill-function: message-do-auto-fill transient-mark-mode: t abbrev-mode: t Recent input: ( M-> C-x C-s M-< M-> M-< M-> M-< C-e M-$ M-> M-x i s i i i a i y ! C-x C-s M-> / SPC . SPC n o t SPC u s j u s t SPC w i t h SPC a SPC d i r e c t SPC r r e f e r n e c e , SPC b u t SPC a l s o M-q C-x C-s M-> C-x C-e C-e C-x C-e M-> C-x C-s M-< M-> SPC ; e r r SPC e r r o r M-> C-x C-s C-x C-s M-> M-x 0 C-x C-s C-x C-g C-x C-f / / t m p / m a i l r e p o r t M-x i n s C-s C-s C-s C-x C-s C-x b M-x r e p o r t - Recent messages: Wrote /home/wellons/*message*-20130826-005023 Mark set Spell-checking *unsent mail* using aspell with default dictionary...done Saving file /home/wellons/*message*-20130826-005023... Wrote /home/wellons/*message*-20130826-005023 (New file) Mark set Saving file /tmp/report... Wrote /tmp/report Undo! Load-path shadows: /home/wellons/.emacs.d/elpa/magit-20130822.712/.dir-locals hides /home/wellons/.emacs.d/elpa/pkg-info-20130817.2334/.dir-locals /home/wellons/.emacs.d/elpa/batch-mode-20110113.952/batch-mode hides ~/.emacs.d/etc/batch-mode /usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell /usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell /home/wellons/.emacs.d/elpa/magit-20130822.712/.dir-locals hides /usr/share/emacs/24.3/lisp/gnus/.dir-locals Features: (shadow mail-extr emacsbug sendmail sort tramp-cache tramp tramp-compat tramp-loaddefs shell pcomplete cus-start cus-load email-setup notmuch notmuch-parser notmuch-message notmuch-maildir-fcc notmuch-hello notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-address notmuch-wash coolj notmuch-query goto-addr icalendar diary-lib diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag crm notmuch-lib message format-spec rfc822 mml mailabbrev gmm-utils mailheader mm-view mml-smime mml-sec smime dig mm-decode mm-bodies mm-encode ispell nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok mc-edit-lines multiple-cursors-core rect youtube-dl-mode hyperspec thingatpt mule-util two-column find-func term ehelp electric shr-color color etags sh-script smie executable debug jka-compr gnutls view url-queue wid-edit timezone parse-time mail-utils network-stream starttls url-http tls mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf mailcap dabbrev magit-cherry magit-bisect magit-key-mode magit grep epa derived epg epg-config diff-mode easy-mmode git-commit-mode magit-compat hl-line feed-setup elfeed disp-table misearch multi-isearch vc-git xml shr browse-url xml-query dired-aux dired server paredit slime-autoloads init batch-mode compile-bind yasnippet help-mode wombat-theme smex ido-ubiquitous ido bracket-face parenface paren warnings skewer-setup skewer-mode cache-table js2-mode cc-mode cc-fonts cc-guess cc-menus cc-styles cc-align cc-cmds cc-engine cc-vars cc-defs imenu jekyll uuid-simple simple-httpd url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util time-date mm-util mail-prsvr password-cache url-vars pp windmove winner uniquify advice help-fns advice-preload whitespace-cleanup whitespace time utility extras edmacro kmacro imgur json batch-mode-autoloads glsl-mode-autoloads graphviz-dot-mode-autoloads ido-ubiquitous-autoloads impatient-mode-autoloads htmlize-autoloads inf-ruby-autoloads inf-ruby ruby-mode compile comint ansi-color ring javadoc-lookup-autoloads lua-mode-autoloads magit-autoloads info easymenu git-rebase-mode-autoloads git-commit-mode-autoloads markdown-mode-autoloads memoize-autoloads multiple-cursors-autoloads notmuch-autoloads nrepl-autoloads clojure-mode-autoloads paredit-autoloads parenface-autoloads pkg-info-autoloads dash-autoloads rdp-autoloads s-autoloads skewer-mode-autoloads js2-mode-autoloads finder-inf simple-httpd-autoloads smex-autoloads yasnippet-autoloads package-helper cl-macs gv cl cl-lib package tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 16:34:33 2013 Received: (at 15190-done) by debbugs.gnu.org; 26 Aug 2013 20:34:33 +0000 Received: from localhost ([127.0.0.1]:57583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VE3Uf-000154-By for submit@debbugs.gnu.org; Mon, 26 Aug 2013 16:34:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:18713) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VE3Ud-00014u-Cc for 15190-done@debbugs.gnu.org; Mon, 26 Aug 2013 16:34:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KK6/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFHO+KK6/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="24463398" Received: from 206-248-162-186.dsl.teksavvy.com (HELO ceviche.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Aug 2013 16:34:23 -0400 Received: by ceviche.home (Postfix, from userid 20848) id EBACC66091; Mon, 26 Aug 2013 16:34:29 -0400 (EDT) From: Stefan Monnier To: Christopher Wellons Subject: Re: bug#15190: 24.3; Reader error when combining print-circle and hash tables Message-ID: References: <87haed11pc.fsf@susie.zeus.nullprogram.com> Date: Mon, 26 Aug 2013 16:34:29 -0400 In-Reply-To: <87haed11pc.fsf@susie.zeus.nullprogram.com> (Christopher Wellons's message of "Mon, 26 Aug 2013 01:05:35 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15190-done Cc: 15190-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I'm running into an issue in Emacs 24.3 where the lisp reader fails to > parse hash tables printed with print-circle set to t. Indeed, there was an oversight. It should be fixed on the trunk now, Stefan === modified file 'src/lread.c' --- src/lread.c 2013-07-20 14:21:25 +0000 +++ src/lread.c 2013-08-26 20:24:36 +0000 @@ -3229,7 +3229,7 @@ if (BOOL_VECTOR_P (subtree)) return subtree; /* No sub-objects anyway. */ else if (CHAR_TABLE_P (subtree) || SUB_CHAR_TABLE_P (subtree) - || COMPILEDP (subtree)) + || COMPILEDP (subtree) || HASH_TABLE_P (subtree)) length = ASIZE (subtree) & PSEUDOVECTOR_SIZE_MASK; else if (VECTORP (subtree)) length = ASIZE (subtree); From unknown Mon Jun 23 04:13:46 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, 24 Sep 2013 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