6

I am reading the Elisp Reference Manual. I have noticed that some informations are truncated (ellipsis: suspension points) while they are displayed in the echo area. How to view (know) their full value?

For instance, look at the example given to introduce the function buffer-local-variables, Variables, Buffer-Local Variables, Creating Buffer-Local.

(make-local-variable 'foobar)
(makunbound 'foobar)
(make-local-variable 'bind-me)
(setq bind-me 69)
(setq lcl (buffer-local-variables))
    ;; First, built-in variables local in all buffers:
⇒ ((mark-active . nil)
    (buffer-undo-list . nil)
    (mode-name . "Fundamental")
    ...
    ;; Next, non-built-in buffer-local variables.
    ;; This one is buffer-local and void:
    foobar
    ;; This one is buffer-local and nonvoid:
    (bind-me . 69))

The function buffer-local-variables returns a list describing the local variables defined in the current buffer. Unfortunately, the echo area does not display all the variables.

((buffer-display-time 23545 18944 425229 321000) (buffer-display-count . 2)\
 (buffer -invisiblity-spec . t) (buffer-file-truename) (point-before-scroll)\
 (buffer-auto-save-file-format . t) (buffer-file-format) (enable-multibyte\
  -characters . t) (mark-active . t) (bidi-paragraph-direction . left-to-right)\
 (local-abbrev-table . [## 0 0 0 0 0 0 0 0 0 0 0 ...])\
 (mode-name . "Lisp Interaction") ...)

The local variables foobar and bind-me are not displayed in the echo area although they are members of the list.

(assoc 'bind-me lcl)
⇒ (bind-me . 69)

How can I view the full `package-alist` value (without the truncation characters "...")?
What is the meaning of the ellipsis at the end of some output?

0

2 Answers 2

8

These variables may be relevant: eval-expression-print-level and eval-expression-print-length: https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Eval.html

See also the variables: print-level and print-length: https://www.gnu.org/software/emacs/manual/html_node/elisp/Output-Variables.html

The *Messages* buffer may contain more information than the minibuffer provided that the appropriate print-length is set.

5
  • Unfortunately, even when the value of those four variables is set to nil the messages buffer and the echo area still truncate some elements. Here's an example: Result: ((entries . #<hash-table equal 15093/18699 0x457c9a47>) (strings) (preamble) (comments) (local-vars) (dialect) (buffer . #<buffer 2:old.bib>) (cur-entry . "OpenPhilanthropy2014CenterBudgetPolicy") (marked-entries) (filter) (sortinfo) (filename . "/Users/pablostafforini/Dropbox/bibliography/old.bi...") (main) (keys) (modtime 25470 28718 565638 721000) (modified) (backup . t))
    – Pablo
    Commented Nov 23, 2022 at 19:20
  • Do you happen to know the name of the variable(s) that control this behavior?
    – Pablo
    Commented Nov 23, 2022 at 19:22
  • @Pablo -- You may wish to consider posting a new question with a minimal working example demonstrating the problem, so that forum participants can see whether the variables mentioned hereinabove are at issue, or whether something else is at play in your particular use-case.
    – lawlist
    Commented Nov 23, 2022 at 20:38
  • Makes sense—thanks. I'll post a question shortly.
    – Pablo
    Commented Nov 24, 2022 at 4:07
  • 2
    I forgot to post the question, but I have now figured out the variables controlling this behavior: edebug-print-level and edebug-print-length. Hopefully this will be useful to others.
    – Pablo
    Commented Mar 1, 2023 at 19:43
0

The messages sent to the echo-area (message) in emacs reference manual also show in the messages buffer. see emacs-wiki:

also look: Inspect message output How to copy minibuffer contents?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.