From: "Pascal J. Bourguignon" <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Inspecting functions returning complicated values
Date: Wed, 01 Oct 2014 16:43:16 +0200 [thread overview]
Message-ID: <87k34jrgu3.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: mailman.10124.1412121528.1147.help-gnu-emacs@gnu.org
Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
> Hi list,
>
> assume that I want to inspect a function whose return value is a long,
> deeply nested list. I found this way to present it in a readable way:
>
> M-: (setq blah-blah (function-returning-hairy-stuff))
> C-h C-v blah-blah
>
> This seems a bit awkward, however. Is there a better/cleaner way?
In most any (writable) buffer, you can type:
(prog1 (terpri) (pp (function-returning-hairy-stuff))) C-u C-x C-e
This won't work only in buffer where C-x C-e is not bound to
eval-last-sexp. In those buffers you can type C-u M-x eval-last-sexp RET
instead of C-u C-x C-e
You can also use ielm:
M-x ielm RET
(pp (function-returning-hairy-stuff)) RET
(pp (other-function-returning-hairy-stuff)) RET
;; etc…
--
__Pascal Bourguignon__ http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk
next prev parent reply other threads:[~2014-10-01 14:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.10124.1412121528.1147.help-gnu-emacs@gnu.org>
2014-10-01 0:36 ` Inspecting functions returning complicated values Emanuel Berg
2014-10-01 14:43 ` Pascal J. Bourguignon [this message]
2014-09-30 23:58 Marcin Borkowski
2014-10-01 0:46 ` Drew Adams
2014-10-01 1:59 ` Eric Abrahamsen
[not found] ` <mailman.10126.1412124387.1147.help-gnu-emacs@gnu.org>
2014-10-02 0:35 ` Emanuel Berg
2014-10-02 3:06 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k34jrgu3.fsf@kuiper.lan.informatimago.com \
--to=pjb@informatimago.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.