From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#28587: 26.0.60; Don't write object name strings in object-write method Date: Sat, 21 Oct 2017 23:29:00 -0400 Message-ID: References: <87efqvg5tw.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508643021 2417 195.159.176.226 (22 Oct 2017 03:30:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Oct 2017 03:30:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 28587@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 22 05:30:15 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e66xo-0007ji-CC for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 05:30:12 +0200 Original-Received: from localhost ([::1]:59944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e66xu-0001ds-5t for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Oct 2017 23:30:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e66xj-0001dJ-5Z for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 23:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e66xe-0000AC-7e for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 23:30:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46157) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e66xe-00009C-4Q for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 23:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e66xd-0005Bn-R8 for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 23:30:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Oct 2017 03:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28587 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28587-submit@debbugs.gnu.org id=B28587.150864294919852 (code B ref 28587); Sun, 22 Oct 2017 03:30:01 +0000 Original-Received: (at 28587) by debbugs.gnu.org; 22 Oct 2017 03:29:09 +0000 Original-Received: from localhost ([127.0.0.1]:54838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e66wm-0005A7-Nc for submit@debbugs.gnu.org; Sat, 21 Oct 2017 23:29:08 -0400 Original-Received: from pmta11.teksavvy.com ([76.10.157.34]:14940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e66wk-00059k-H2 for 28587@debbugs.gnu.org; Sat, 21 Oct 2017 23:29:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2FiEAAUEOxZ/4AFNJ1cHQEFAQsBg15EgQ6JLoYGjkoBgXkxAZgYhT8EAgKEO0QUAQIBAQEBAQEBA2gohR4BBAFWIwULCzQSFBgNJIorCK0fixUBAQEBAQUCJoMuiDU1inoFkVCHIYh1oE+HRpc1NiKBWzQhCDJJgmWEeiSLGQEBAQ X-IPAS-Result: A2FiEAAUEOxZ/4AFNJ1cHQEFAQsBg15EgQ6JLoYGjkoBgXkxAZgYhT8EAgKEO0QUAQIBAQEBAQEBA2gohR4BBAFWIwULCzQSFBgNJIorCK0fixUBAQEBAQUCJoMuiDU1inoFkVCHIYh1oE+HRpc1NiKBWzQhCDJJgmWEeiSLGQEBAQ X-IronPort-AV: E=Sophos;i="5.43,414,1503374400"; d="scan'208";a="7280167" Original-Received: from 157-52-5-128.cpe.teksavvy.com (HELO pastel.home) ([157.52.5.128]) by smtp.teksavvy.com with ESMTP; 21 Oct 2017 23:29:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 96126606AA; Sat, 21 Oct 2017 23:29:00 -0400 (EDT) In-Reply-To: <87efqvg5tw.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 24 Sep 2017 14:11:23 -0700") 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: 208.118.235.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:138837 Archived-At: > If we're going to ignore them, we might as well not write them to begin > with. Agreed. > --- a/lisp/emacs-lisp/eieio-base.el > +++ b/lisp/emacs-lisp/eieio-base.el > @@ -255,8 +255,11 @@ eieio-persistent-convert-list-to-object > Note: This function recurses when a slot of :type of some object is > identified, and needing more object creation." > (let* ((objclass (nth 0 inputlist)) > - ;; (objname (nth 1 inputlist)) > - (slots (nthcdr 2 inputlist)) > + ;; Earlier versions of `object-write' added a string name for > + ;; the object, now obsolete. > + (slots (nthcdr > + (if (stringp (nth 1 inputlist)) 2 1) > + inputlist)) > (createslots nil) > (class > (progn This looks good, feel free to install it into `master'. > diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el > index 75f1097acf..448d5e6fe2 100644 > --- a/lisp/emacs-lisp/eieio.el > +++ b/lisp/emacs-lisp/eieio.el > @@ -874,8 +874,6 @@ eieio-print-depth > (princ (make-string (* eieio-print-depth 2) ? )) > (princ "(") > (princ (symbol-name (eieio--class-constructor (eieio-object-class this)))) > - (princ " ") > - (prin1 (eieio-object-name-string this)) > (princ "\n") > ;; Loop over all the public slots > (let ((slots (eieio--class-slots cv)) This is more problematic since data generated with this hunk will be incompatible with an Emacs which doesn't have the other hunk applied. So I think this should be conditional on a defcustom and by default this defcustom should cause the code to still behave as before. Stefan