From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Display an eieio object Date: Fri, 15 Jun 2018 05:53:29 +0200 Message-ID: <87y3fgln7q.fsf@web.de> References: <20180614074508.124fe601@gauss> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529034731 16734 195.159.176.226 (15 Jun 2018 03:52:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2018 03:52:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Help GNU Emacs To: Joe Riel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 15 05:52:06 2018 Return-path: Envelope-to: geh-help-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 1fTfmQ-0004Dc-Mt for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jun 2018 05:52:06 +0200 Original-Received: from localhost ([::1]:44162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTfoX-0005fZ-Q2 for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jun 2018 23:54:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTfnz-0005fO-Kx for help-gnu-emacs@gnu.org; Thu, 14 Jun 2018 23:53:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTfnu-00004q-Le for help-gnu-emacs@gnu.org; Thu, 14 Jun 2018 23:53:43 -0400 Original-Received: from mout.web.de ([217.72.192.78]:58651) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTfnu-0008Uf-Be for help-gnu-emacs@gnu.org; Thu, 14 Jun 2018 23:53:38 -0400 Original-Received: from drachen.dragon ([188.110.196.170]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LpfC6-1g7wpY3WHG-00fOKn; Fri, 15 Jun 2018 05:53:30 +0200 In-Reply-To: <20180614074508.124fe601@gauss> (Joe Riel's message of "Thu, 14 Jun 2018 07:45:08 -0700") X-Provags-ID: V03:K1:2t8hlwoC0QO6aqad+xtOGulrm9/8Tm/EydfOQ1MzLq5qsZURkTF LjylJt+I6lXzv3yEgOFeLIdvE0gDfzqrfXuP4bp+symGuEi/Aa65WN0XLOHNY6Zhyl/E1Ee LpzVi+eY1s5eT3LEKyvALrEnLt9LTuOOKN8md7r3An5K3KOLWkgi0K+4R1vHrLprCxGi0JZ fwjlw6n3x3BfxikMdaqwQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:fCMoZyiaXOQ=:cPW/+AzMDFSk3tSHPJBBcH T6Z7qJa4RJymGerTXEbZZ2Yk29aWACD/nyKMbN3bqfWyl0PyFkQBNZ+eUgs/9FDoBWf+ubHln f5Mt5XZpzDUbJ7HdIPpryZlwf1D7bRCKeuB2IaAA9EoFmW6lCL5PxcuD1Lz42FQdTIDnbgn42 xl4S8tguqysquhkDWhOhFw/LKDV8PpOeSkP//fzjQXELpqhN1wmrwbWMs9hSQmJ8crk8022Ry kkRmx2EK/ynQxu05zCHjxLxjRoa5qhVjIxCe4wHr6a9m5paAXjOyJD92/XRJBTt5Xxi63NFvn M47zWUVLyYo+jZS29gLv92yzdFIcB1H20mY4q4eigxsK+L12q8a1oQLuh/LSvcC0Zbj1hUQjj ul8PTVdcxbc0X4/BSWR2iYS8Psct+2IQfhzn3LUq0Gb9yDcnUtZkWZ84m/xAuXtZHZS9MiXg0 QbhI6/qCSb41kEsbUDUcLdppzGdqHE2TYnkDDO2HULGCvEKLV0W7e2UaOGcW5yGu0idv/Agqc ds+6y57UhXCgvq1lDV+QEWdPja9m7QL5wrmMa51lpaj3GoSmf6+yslnFnl9eta8F1eHOtNHKS Zqaw650trytOEwF37CRxQa4P9lVEpKB1DKb2rOHCyTIrOS016tiosDQfMmmsEzwdowKMHKTlO 8cSJAcg2je5piAFcIdlo1YDT9cj360lWzh3gQ6iHRDcmlKyecdKKnCiyQ5db8Tq4ADs7SJjWc 4Oc40owApNe+Uo9Xab4hnD1cLwoM4G5ag3m2k+CgRMimj6uMWzbhXw6GwtfGaJWbEmv+iaAK X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.78 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117167 Archived-At: Joe Riel writes: > Is there a way to nicely display an eieio object? Using > describe-variable (C-h v) shows the values but not the slot names, > which makes it less than helpful. Depends a bit on your Emacs version. Since Emacs 26, C-h v uses the new cl-print.el to print variable values. Eieio implements the cl-print-object method for eieio-objects, and that just falls back to `object-print'. `object-print' also existed before Emacs 26, but AFAIK it prints only a wrapper and no values at all. You would need to reimplement the `object-print' method to do what you want, probably looping over the `eieio-class-slots'. You can even use different implementations for different classes - the infrastructure is all there. If you have a recent enough Emacs version, C-v should automatically use your method implementation(s). Michael.