[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inspecting functions returning complicated values
From: |
Pascal J. Bourguignon |
Subject: |
Re: Inspecting functions returning complicated values |
Date: |
Wed, 01 Oct 2014 16:43:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
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
- Re: Inspecting functions returning complicated values,
Pascal J. Bourguignon <=