7

When I do C-h v package-alist, I see something like

((PACKAGE-NAME1 [cl-struct-package-desc
                PACKAGE-NAME1
                (VERSION1)
                "DESCRIPTION1"
                (DEPENDENCIES-ALIST1)
                nil
                nil
                "LOCAL-INST-PATH1"
                (URL-ALIST1)
                nil])

 (PACKAGE-NAME2 [cl-struct-package-desc
                PACKAGE-NAME2
                (VERSION2)
                "DESCRIPTION2"
                (DEPENDENCIES-ALIST2)
                nil
                nil
                "LOCAL-INST-PATH2"
                (URL-ALIST2)
                nil])
  ...)

How can I see the full alist instead of its truncated form with the ellipsis characters ... at the end?

Drew
  • 75,699
  • 9
  • 109
  • 225
Kaushal Modi
  • 25,203
  • 3
  • 74
  • 179
  • 3
    I've got `eval-expression-print-length` and `eval-expression-print-level` both at `nil` for this reason. It can be a pain though if something too large is printed. – abo-abo Feb 04 '15 at 20:02
  • 4
    You can also press `RET` on the ellipsis to expand it. I usually press `RET` and then yank-paste it. There's also a way to cancel the special overlay that hides the rest of the printed text with one function, but I think one would have to write it. Also see: http://stackoverflow.com/questions/13568262 – wvxvw Feb 04 '15 at 20:26

2 Answers2

11

As mentioned in the comments you can tweak eval-expression-print-* or expand by hitting RET or mouse-2 on the ellipses (which calls last-sexp-toggle-display). However probably the most useful for general messing around in the *scratch* buffer is:

(pp package-alist)

Which will format the output in a more readable way.

stsquad
  • 4,626
  • 28
  • 45
6

Set eval-expression-print-length and eval-expression-print-level to nil.

sds
  • 5,928
  • 20
  • 39