From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joe Riel Newsgroups: gmane.emacs.help Subject: Re: Display an eieio object Date: Fri, 15 Jun 2018 07:36:25 -0700 Message-ID: <20180615073625.1264d160@gauss> References: <20180614074508.124fe601@gauss> <87y3fgln7q.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1529075603 5357 195.159.176.226 (15 Jun 2018 15:13:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2018 15:13:23 +0000 (UTC) Cc: Help GNU Emacs To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 15 17:13:19 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 1fTqPe-0001HD-SV for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jun 2018 17:13:18 +0200 Original-Received: from localhost ([::1]:47445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTqRm-0003H5-1h for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jun 2018 11:15:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTpq7-0003KV-DN for help-gnu-emacs@gnu.org; Fri, 15 Jun 2018 10:36:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTpq3-0008Bg-AY for help-gnu-emacs@gnu.org; Fri, 15 Jun 2018 10:36:35 -0400 Original-Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.227]:44349 helo=cdptpa-cmomta03.email.rr.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fTpq3-0008B3-4J for help-gnu-emacs@gnu.org; Fri, 15 Jun 2018 10:36:31 -0400 Original-Received: from gauss ([75.80.191.41]) by cmsmtp with SMTP id TptnfJ5oZB3KITptqfsOGp; Fri, 15 Jun 2018 14:40:27 +0000 In-Reply-To: <87y3fgln7q.fsf@web.de> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) X-CMAE-Envelope: MS4wfDT0QIjThsEqzhsAUUrrllBcaQvRgjkRU/Oc6Okfl9eA5sUpEEg1NtW1vh20/byz1hKMA5UwoB5p/pwZCU0SWHsx9JENIJucIC7Jsm/ub4JfDGnflBTv RCyqWxur8iQQIj4iYHj0crkRyQBBj7hnNdDIyVs4+S/Pgc5+q7Rootah X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 107.14.166.227 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:117173 Archived-At: On Fri, 15 Jun 2018 05:53:29 +0200 Michael Heerdegen wrote: > 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). Thanks. Having only recently upgraded to Emacs 25, it will probably be a while until I can use that, but will plan accordingly. -- Joe Riel