From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: pillule Newsgroups: gmane.emacs.help Subject: EIEIO accessing class slots Date: Thu, 10 Jun 2021 17:20:35 +0200 Message-ID: <87eed9pwyi.fsf@riseup.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6510"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 10 17:34:39 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrMhb-0001QN-8u for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 10 Jun 2021 17:34:39 +0200 Original-Received: from localhost ([::1]:48098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrMha-0007rp-55 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 10 Jun 2021 11:34:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrMe8-0000mq-7Z for help-gnu-emacs@gnu.org; Thu, 10 Jun 2021 11:31:04 -0400 Original-Received: from mx1.riseup.net ([198.252.153.129]:34546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrMe4-0005Ud-CG for help-gnu-emacs@gnu.org; Thu, 10 Jun 2021 11:31:03 -0400 Original-Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4G17Gq0ZfJzDs9B for ; Thu, 10 Jun 2021 08:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1623339059; bh=rX/7HlJvOiitBgjP8N6HYy0y/4eh4SgM15H0tEXy+Dk=; h=From:To:Subject:Date:From; b=a3fOmJL6xhZBe+zqQ/9Pp/e/48ZbrNaBncIWVPSlYcHuIg32IKwZhg1KFU5jsq8jY e3icF0hnKy6x5WTiXrGNoLHOMSC8y7jxZzYPB7SkD+0t71H0isG/n21PqCFDaMsgZ9 gBrtvIanbybfwzordy5TBjX3xS9U8F4voQ4s6khE= X-Riseup-User-ID: 8232E6FF9DE94F782488091032A14BEEAB0F20542D401C93C9376F684BECD8E5 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4G17Gp1Q80z5wGd for ; Thu, 10 Jun 2021 08:30:57 -0700 (PDT) Received-SPF: pass client-ip=198.252.153.129; envelope-from=pillule@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130706 Archived-At: Hi How can I accede to the initarg of an eieio class ? Let's say I have a class as : (defclass moirai-dired-side () ((display-alist :initarg :display-alist :initform '((moirai-dired-p) (display-buffer--in-dired-side-window) (slot . 0) (side . left) (select . t) (preserve-size (t . t)) (window-width . 35) (window-parameters . ((no-other-window . t) (no-delete-other-windows . t)))) :custom (custom-variable-type 'display-buffer-alist) :documentation "Alist of conditionals actions for `display-buffer', It is the same format that `display-buffer-alist'."))) Now I can create instances with (setf morai-dired-side-left (moirai-dired-side)) And so far manipulating the object will work fine, but if we go back to the class itself ... ;; apparently this is not an eieio-class ?! (eieio--class-p 'morai-dired-side) ;; => nil ;; but I can anyway access its slots (eieio-class-slots 'moirai-dired-side) ;; => (#s(cl-slot-descriptor display-alist '((moirai-dired-p) (display-buffer--in-dired-side-window) (slot . 0) (side . left) (select . t) (preserve-size (t . t)) (window-width . 35) (window-parameters (no-other-window . t) (no-delete-other-windows . t))) t ((:documentation . "Alist of conditionals actions for `display-buffer', It is the same format that `display-buffer-alist'.") (:custom custom-variable-type 'display-buffer-alist) (:group default)))) ;; the issue is I have no idea of how to get them individually (eieio--class-slot-initarg 'moirai-dired-side :display-alist) ;; ! Wrong type argument: eieio--class, moirai-dired-side, class Am I missing something ? I seen a bug report from 2015 at this subject (#bug19552) but it doesn't help. As a side note the eieio manual is outdated, it references 'class-slot-initarg', while it is now 'eieio--class-slot-initarg'. --