help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display an eieio object


From: Joe Riel
Subject: Re: Display an eieio object
Date: Fri, 15 Jun 2018 07:36:25 -0700

On Fri, 15 Jun 2018 05:53:29 +0200
Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Joe Riel <joer@san.rr.com> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]