Subject: Re: bug#33441: reading and printing Lisp Objects - what changed from 25.3.1 to 26.1?

From: Noam Postavsky <[email-masked]>
Date: Tue, 02 Apr 2019 09:29:53 -0400

Peter Milliken <[email-masked]> writes:

> (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

> I tried this and the read code still throws an error when reading the
> objects back from the file.

I tried it here; this time the error isn't from reading, but from
add-element "Attempting to add an illegal object to language".  So this
means it really is the same problem as in bug#29220: that newly read
objects don't have the right type.

A quick demo:

    (require 'eieio)

    (defclass foo ()
      ())

    (let ((print-circle t)
          (foo-obj (make-instance 'foo)))
      (cl-assert (foo-p foo-obj))
      ;; This assertion fails!
      (cl-assert (foo-p (read (prin1-to-string foo-obj)))))