unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Joe Riel <joer@san.rr.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Display an eieio object
Date: Fri, 15 Jun 2018 07:36:25 -0700	[thread overview]
Message-ID: <20180615073625.1264d160@gauss> (raw)
In-Reply-To: <87y3fgln7q.fsf@web.de>

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	other threads:[~2018-06-15 14:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 14:45 Display an eieio object Joe Riel
2018-06-15  1:18 ` Pierre Lorenzon
2018-06-15  3:53 ` Michael Heerdegen
2018-06-15 14:36   ` Joe Riel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180615073625.1264d160@gauss \
    --to=joer@san.rr.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).