From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pierre Lorenzon Newsgroups: gmane.emacs.bugs Subject: bug#20914: eieio/slot/group Date: Wed, 01 Jul 2015 06:02:28 +0200 (CEST) Message-ID: <20150701.060228.1839196597497012994.devel@pollock-nageoire.net> References: <20150629.063137.1610262414319480638.devel@pollock-nageoire.net> <20150629.192952.75170699401312078.devel@pollock-nageoire.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1435724004 29767 80.91.229.3 (1 Jul 2015 04:13:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Jul 2015 04:13:24 +0000 (UTC) Cc: 20914@debbugs.gnu.org To: monnier@iro.umontreal.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 01 06:13:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZA9OY-0004Hv-Ru for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jul 2015 06:13:11 +0200 Original-Received: from localhost ([::1]:49578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZA9OX-0000W3-Td for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jul 2015 00:13:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZA9OT-0000Vc-NQ for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2015 00:13:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZA9OQ-0006CC-GI for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2015 00:13:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZA9OQ-0006BO-DH for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2015 00:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZA9OP-0007Cd-Td for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2015 00:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pierre Lorenzon Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2015 04:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20914 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20914-submit@debbugs.gnu.org id=B20914.143572392527625 (code B ref 20914); Wed, 01 Jul 2015 04:13:01 +0000 Original-Received: (at 20914) by debbugs.gnu.org; 1 Jul 2015 04:12:05 +0000 Original-Received: from localhost ([127.0.0.1]:35017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZA9NU-0007BV-UJ for submit@debbugs.gnu.org; Wed, 01 Jul 2015 00:12:05 -0400 Original-Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:45254 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZA9NR-0007Au-1y for 20914@debbugs.gnu.org; Wed, 01 Jul 2015 00:12:02 -0400 Original-Received: from localhost ([86.212.76.37]) by mwinf5d48 with ME id msBt1q00C0oHB8603sBuTj; Wed, 01 Jul 2015 06:11:54 +0200 X-ME-Helo: localhost X-ME-Date: Wed, 01 Jul 2015 06:11:54 +0200 X-ME-IP: 86.212.76.37 In-Reply-To: X-Mailer: Mew version 6.5 on Emacs 25.0.50 / Mule 6.0 (HANACHIRUSATO) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104559 Archived-At: From: Stefan Monnier Subject: Re: bug#20914: eieio/slot/group Date: Tue, 30 Jun 2015 14:09:20 -0400 >> The problem comes from use of `copy-sequence' in >> `eieio-copy-parents-into-subclass' function of eieio-core. this >> copy is not reccursive as explained in code comment but it >> should be ! There's a joined patch that fixes the bug. > > Thanks for the investigation. I think the fix should be Sure it is better to have a true copier for cl--slot-descriptor. > applied deeper. Can you confirm that the patch below works for you unfortunately it does not ! I modified cl-preloaded.el recompiled it but once restarting emacs my example classes do not havae suitable properties. When doing Ch f cl--copy-slot-descriptor I get that it is an alias for copy-sequence as it was before and not the function defined by the new definition you gave. Moreover if I force cl-prelaoded.el to be loaded I get the correct definition. I suspect that things are not loaded as they should but why .... > as well? > > > Stefan > > > diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el > index ed0639b..2e9bdde 100644 > --- a/lisp/emacs-lisp/cl-preloaded.el > +++ b/lisp/emacs-lisp/cl-preloaded.el > @@ -195,7 +195,7 @@ > (:constructor nil) > (:constructor cl--make-slot-descriptor > (name &optional initform type props)) > - (:copier cl--copy-slot-descriptor)) > + (:copier nil)) > ;; FIXME: This is actually not used yet, for circularity reasons! > "Descriptor of structure slot." > name ;Attribute name (symbol). > @@ -205,6 +205,11 @@ > ;; :documentation, :protection, :custom, :label, :group, :printer. > (props nil :type alist)) > > +(defun cl--copy-slot-descriptor (slot) > + (let ((new (copy-sequence slot))) Are you sure that a copy-sequence will be enough here ? props themselves are sequences hence they will be referenced by this copy-sequence not copied. I think that a copy-tree should be used here. > + (cl-callf copy-sequence (cl--slot-descriptor-props new)) > + new)) > + > (cl-defstruct (cl--class > (:constructor nil) > (:copier nil)) Ok I'll try to understand why it does not work. I'll probably learn something in this history and that's good ! Pierre