From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Peter Milliken Newsgroups: gmane.emacs.bugs 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-ID: References: <837eh7hz33.fsf@gnu.org> <87v9zxgu1o.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000067593c058583373a" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="247632"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 33441@debbugs.gnu.org, eggert@cs.ucla.edu To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 02 04:52:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hB9X6-0012IF-I7 for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Apr 2019 04:52:16 +0200 Original-Received: from localhost ([127.0.0.1]:53080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB9X5-0001A4-Ev for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Apr 2019 22:52:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB9Wy-00019t-P4 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2019 22:52:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hB9Wu-0003Bv-GK for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2019 22:52:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54914) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hB9Ws-00038E-Gx for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2019 22:52:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hB9Ws-00066r-A1 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2019 22:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Peter Milliken Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Apr 2019 02:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33441 X-GNU-PR-Package: emacs Original-Received: via spool by 33441-submit@debbugs.gnu.org id=B33441.155417350923466 (code B ref 33441); Tue, 02 Apr 2019 02:52:02 +0000 Original-Received: (at 33441) by debbugs.gnu.org; 2 Apr 2019 02:51:49 +0000 Original-Received: from localhost ([127.0.0.1]:40225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hB9We-00066P-J1 for submit@debbugs.gnu.org; Mon, 01 Apr 2019 22:51:48 -0400 Original-Received: from mail-it1-f175.google.com ([209.85.166.175]:51878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hB9Wc-00066C-0c for 33441@debbugs.gnu.org; Mon, 01 Apr 2019 22:51:46 -0400 Original-Received: by mail-it1-f175.google.com with SMTP id s3so2684638itk.1 for <33441@debbugs.gnu.org>; Mon, 01 Apr 2019 19:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nCspecRWJ/i/UftDQydn4FUbRWCcEXEjGOl1OLhFd44=; b=qrKnhFsxwMuO46TiLH7CbeDkqFpc8rbCavHG9VgBBdz54NUOL8HoQbn5iU7MQePssO yWgZwHiWw5x34TxxTQ5wSMbaIQF3lWR37jLrR7vTO0uTqnqXgLstINRyl7/xfO+eUCfn o31cPuxQamr4LrowAKkk5snRQ2NMgrN4BWWW+psnvYDsz94B4IHPs5llRL0xlD1x9vbA D20k3CByoE39oc3K9V3w/iI/8Mh5huPJ82lUyCjEPOMAM2qumENn7LLZxlDzG19T4vBF E0n18ZhZOBvQxcx43KP+pheExfebaDbvX939byA/eEvy1p+bPzph2mTcSGrxxlb0sGm2 W7Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nCspecRWJ/i/UftDQydn4FUbRWCcEXEjGOl1OLhFd44=; b=txNv8anNH1tchMICZRjoCxc+eSSOC2ABzcDxiqU/3Ef1JzMC/9AH9U9s5yqQSdB7vQ AaUzr28WPjvjUJcCEhQj/aTiD8IrerQStGtdRmX9MT2u5OcRhloPpEgAKh7aoCDtRQPw WF5rvhsZD7caTulldjS2pJSqnzMhbgSBv8BSXlcCCvxbrThOyzMKcUyL8PbNXgHwotjJ c2W4VUccLBMpx6P19fl30LT16MDfWB/ergYxc454kjXs3q8rfiTyI+ncMmPMGK4kLpfQ yWXd1zMZcdUH6FMPizmtAkEuiU3R7lqOe20E/n6PUJmw5100bVMSmoYDVs0pgTpZGmd0 814w== X-Gm-Message-State: APjAAAVvl8SnbEWE+BahHofBoBALDRtNFV93KbgRq9oRRiQaYx3QxvPb txElH6Pg5JLLyHYV0pKdo1U72mqvJzZrlyPuuEE= X-Google-Smtp-Source: APXvYqy/8iwdVTDvWIGx/jyM2Y1aRd8s/WOrVutWPMjjBNWaZbFrE2DrFtBuOVAvDeBv95jOB705UZxRROPFdAujiVw= X-Received: by 2002:a05:660c:40d:: with SMTP id c13mr607134itk.115.1554173500281; Mon, 01 Apr 2019 19:51:40 -0700 (PDT) In-Reply-To: <87v9zxgu1o.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:157072 Archived-At: --00000000000067593c058583373a Content-Type: text/plain; charset="UTF-8" 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 wrote: > Peter Milliken 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 ...)) > --00000000000067593c058583373a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Noam,

Thanks for th= e reply. If I understand correctly, you intend a change like this:

(cl-defmethod dump-language-to-file ((obj else-reposi= tory) name to-file)
=C2=A0 (let ((language-to-dump (access-langua= ge else-Language-Repository name))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (w= rite-marker nil)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (language-output-buf= fer nil)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (print-circle t))=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 <-------------------- new line
=C2=A0 =C2= =A0 (save-excursion
=C2=A0 =C2=A0 =C2=A0 (unless (file-directory-= p (file-name-directory to-file))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (mak= e-directory (file-name-directory to-file)))
.
.
=C2= =A0 =C2=A0 =C2=A0 (mapatoms (lambda (e)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (print (symbol-plist e) write-mar= ker))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (or= ef language-to-dump placeholders))
=C2=A0 =C2=A0 =C2=A0 (save-buf= fer)
=C2=A0 =C2=A0 =C2=A0 (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 Posta= vsky <npostavs@gmail.com> w= rote:
Peter Mill= iken <pete= r.milliken@gmail.com> writes:

> I'm not sure that I am giving up on Emacs maintenance - the refere= nce 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.=C2=A0 Does it hel= p
to let-bind print-circle to t in dump-language-to-file?=C2=A0 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<= br> this?

=C2=A0 =C2=A0 (defclass foo ()
=C2=A0 =C2=A0 =C2=A0 ())

=C2=A0 =C2=A0 (read (prin1-to-string (make-instance 'foo))) ;=3D> (i= nvalid-read-syntax "#")

=C2=A0 =C2=A0 (read (let ((print-circle t))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (prin1-to-string (make-instance &= #39;foo)))) ;=3D> #s(#s(eieio--class foo ...))
--00000000000067593c058583373a--