From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16103: 24.3.50; `read' and circular objects Date: Tue, 10 Dec 2013 12:51:16 -0800 (PST) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1386708742 27878 80.91.229.3 (10 Dec 2013 20:52:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Dec 2013 20:52:22 +0000 (UTC) To: 16103@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 10 21:52:27 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VqUI6-00062s-Ti for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Dec 2013 21:52:27 +0100 Original-Received: from localhost ([::1]:51243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqUI6-0002Ev-IM for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Dec 2013 15:52:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqUHs-0002Dd-Tg for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 15:52:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqUHi-0005NN-QT for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 15:52:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqUHi-0005My-O1 for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 15:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VqUHi-0008Kx-Gi for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 15:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Dec 2013 20:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16103 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138670871232025 (code B ref -1); Tue, 10 Dec 2013 20:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Dec 2013 20:51:52 +0000 Original-Received: from localhost ([127.0.0.1]:42233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqUHX-0008KR-HN for submit@debbugs.gnu.org; Tue, 10 Dec 2013 15:51:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55702) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqUHU-0008KG-HW for submit@debbugs.gnu.org; Tue, 10 Dec 2013 15:51:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqUHK-00058j-7V for submit@debbugs.gnu.org; Tue, 10 Dec 2013 15:51:48 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqUHK-00058d-4v for submit@debbugs.gnu.org; Tue, 10 Dec 2013 15:51:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqUHB-0002By-9Z for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 15:51:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqUH2-000543-7j for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 15:51:29 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:45132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqUH2-00053x-1T for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2013 15:51:20 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rBAKpIwv026851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 10 Dec 2013 20:51:19 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBAKpHu8028485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 10 Dec 2013 20:51:18 GMT Original-Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBAKpHYW024612 for ; Tue, 10 Dec 2013 20:51:17 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:81713 Archived-At: Dunno whether this is a bug. If it is not, I'd appreciate some help understanding it. (elisp) `Circular Objects' does not seem to cover it, AFAICT. This Lisp code is in a file: ((last-sort-comparer (bmkp-info-cp bmkp-gnus-cp bmkp-url-cp bmkp-local-file-type-cp) bmkp-alpha-p) (last-reverse-sort-p) (last-reverse-multi-sort-p) (last-latest-bookmark-alist #1=3D(#4=3D#("setq" 0 4 =09=09=09=09 (bmkp-full-record #1#)) =09=09=09=09 (filename . "~/.emacs") =09=09=09=09 (buffer-name . ".emacs") =09=09=09=09 (front-context-string . " (append (l") =09=09=09=09 (rear-context-string . "(setq load-path\n") =09=09=09=09 (front-context-region-string) =09=09=09=09 (rear-context-region-string) =09=09=09=09 (visits . 0) =09=09=09=09 (time . #2=3D(21158 44564 146055 551000)) =09=09=09=09 (created . #2#) =09=09=09=09 (position . 17))) (last-bmenu-omitted-bookmarks) (last-bmenu-marked-bookmarks) (last-bmenu-filter-function) (last-bmenu-filter-pattern . #3=3D"") (last-bmenu-title . #3#) (last-bmenu-bookmark . #4#) (last-specific-buffer . #3#) (last-specific-file . #3#) (last-bmenu-toggle-filenames . t) (last-bmenu-before-hide-marked-alist) (last-bmenu-before-hide-unmarked-alist) (last-bookmark-file . "/home/fcihh/.emacs.bmk")) With point at bob in the file, I do (read (current-buffer)), and this is the result: ((last-sort-comparer (bmkp-info-cp bmkp-gnus-cp bmkp-url-cp bmkp-local-file-type-cp) bmkp-alpha-p) (last-reverse-sort-p) (last-reverse-multi-sort-p) (last-latest-bookmark-alist (#("setq" 0 4 (bmkp-full-record #2)) (filename . "~/.emacs") (buffer-name . ".emacs") (front-context-string . " (append (l") (rear-context-string . "(setq load-path\n") (front-context-region-string) (rear-context-region-string) (visits . 0) (time 21158 44564 146055 551000) (created 21158 44564 146055 551000) (position . 17))) (last-bmenu-omitted-bookmarks) (last-bmenu-marked-bookmarks) (last-bmenu-filter-function) (last-bmenu-filter-pattern . "") (last-bmenu-title . "") (last-bmenu-bookmark . #("setq" 0 4 (bmkp-full-record (#2 (filename . "~/.emacs") (buffer-name . ".emacs") (front-context-string . " (append (l") (rear-context-string . "(setq load-path\n") (front-context-region-string) (rear-context-region-string) (visits . 0) (time 21158 44564 146055 551000) (created 21158 44564 146055 551000) (position . 17))))) (last-specific-buffer . "") (last-specific-file . "") (last-bmenu-toggle-filenames . t) (last-bmenu-before-hide-marked-alist) (last-bmenu-before-hide-unmarked-alist) (last-bookmark-file . "/home/fcihh/.emacs.bmk")) Notice the remaining #2 occurrences. I would have expected the above pp-written sexp to be similar to what was in the file: a representation of similar circular list structure. Or if not that, I would at least expect that all #-notation references to shared structure would be resolved, so that there are no orphaned references like #2. I would prefer to have `read' give me the (equivalent/similar) list structure, with circularities. But I could probably live with `read' giving me a tree with copies where there originally was shared structure (i.e., all # references resolved). What I'm seeing looks to me like a bug. Help understanding is appreciated. I write out a list structure that has circularities, and I want to `read' the result to get back a similar structure. What should I be doing differently, or what is it that I need to be aware of, that I'm currently missing? Thx. In GNU Emacs 24.3.50.2 (i686-pc-mingw32) of 2013-11-28 on LEG570 Bzr revision: 115271 rgm@gnu.org-20131128203155-qjc1xsp19z2k64b2 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG= =3D1'