From: Peter Milliken <peter.milliken@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 33441@debbugs.gnu.org, eggert@cs.ucla.edu
Subject: bug#33441: reading and printing Lisp Objects - what changed from 25.3.1 to 26.1?
Date: Tue, 2 Apr 2019 13:51:31 +1100 [thread overview]
Message-ID: <CAA0nDNs6J0ot8xsM4xQeHg8Jhk90+3TzEsAtsrAn-c51h2Sn4Q@mail.gmail.com> (raw)
In-Reply-To: <87v9zxgu1o.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]
Hi Noam,
Thanks for the reply. If I understand correctly, you intend a change like
this:
(cl-defmethod dump-language-to-file ((obj else-repository) name to-file)
(let ((language-to-dump (access-language else-Language-Repository name))
(write-marker nil)
(language-output-buffer nil)
(print-circle t))
<-------------------- new line
(save-excursion
(unless (file-directory-p (file-name-directory to-file))
(make-directory (file-name-directory to-file)))
.
.
(mapatoms (lambda (e)
(print (symbol-plist e) write-marker))
(oref language-to-dump placeholders))
(save-buffer)
(kill-buffer))))
I tried this and the read code still throws an error when reading the
objects back from the file.
Peter
On Tue, Apr 2, 2019 at 10:55 AM Noam Postavsky <npostavs@gmail.com> wrote:
> Peter Milliken <peter.milliken@gmail.com> writes:
>
> > I'm not sure that I am giving up on Emacs maintenance - the reference
> Noam
> > supplied indicates this is a "well known" issue and somebody, has some
> > intention, at some stage, to do something about it, but given the last
> > update to referenced bug/email stream was 268 days ago, that intention
> may
> > be on the back burner :-)
>
> Hi, I'm reviewing some old bugs, and I think I missed explicitly giving
> the obvious suggestion to you here the first time around. Does it help
> to let-bind print-circle to t in dump-language-to-file? Bug#29220 has a
> lot more going on because it concerns eieio-persist* functions, which as
> far as I can tell, your package is not using.
>
> > Faking up a code snippet is not necessarily that easy
>
> Possibly I'm missing something, but is there more to your problem than
> this?
>
> (defclass foo ()
> ())
>
> (read (prin1-to-string (make-instance 'foo))) ;=> (invalid-read-syntax
> "#")
>
> (read (let ((print-circle t))
> (prin1-to-string (make-instance 'foo)))) ;=>
> #s(#s(eieio--class foo ...))
>
[-- Attachment #2: Type: text/html, Size: 2904 bytes --]
next prev parent reply other threads:[~2019-04-02 2:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 7:21 bug#33441: reading and printing Lisp Objects - what changed from 25.3.1 to 26.1? Peter Milliken
2018-11-20 20:56 ` Paul Eggert
2018-11-20 21:02 ` Noam Postavsky
2018-11-20 21:09 ` Peter Milliken
2018-11-20 21:17 ` Paul Eggert
2018-11-20 21:19 ` Noam Postavsky
2018-11-21 1:52 ` Peter Milliken
2018-11-21 3:27 ` Basil L. Contovounesios
2018-11-21 3:46 ` Eli Zaretskii
2018-11-21 4:21 ` Peter Milliken
2018-11-23 7:12 ` Paul Eggert
2019-04-01 23:55 ` Noam Postavsky
2019-04-02 2:51 ` Peter Milliken [this message]
2019-04-02 13:29 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA0nDNs6J0ot8xsM4xQeHg8Jhk90+3TzEsAtsrAn-c51h2Sn4Q@mail.gmail.com \
--to=peter.milliken@gmail.com \
--cc=33441@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=npostavs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).