GNU bug report logs - #33441
reading and printing Lisp Objects - what changed from 25.3.1 to 26.1?

Previous Next

Package: emacs;

Reported by: Peter Milliken <peter.milliken <at> gmail.com>

Date: Tue, 20 Nov 2018 07:23:01 UTC

Severity: normal

Merged with 29220

Found in version 26.0.90

Full log


View this message in rfc822 format

From: Peter Milliken <peter.milliken <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 33441 <at> debbugs.gnu.org, eliz <at> gnu.org, eggert <at> 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
[Message part 1 (text/plain, inline)]
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 <at> gmail.com> wrote:

> Peter Milliken <peter.milliken <at> 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 ...))
>
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 74 days ago.

Previous Next


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