Everybody Dance NOW!

Emacs variable eval-expression-print-length

April 12, 2009 16:41

Often I'll use (pp) or (message) to inspect a data structure in elisp. For example lets say I have a list l:

(setq l '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) (message l) => (1 2 3 4 5 6 7 8 9 10 11 12 ...)

Often times I want to see the entire list instead of the truncated version. That's where eval-expression-print-length comes in. Setting this variable to nil results in the entire list being printed.

(message "%s" eval-expression-print-length) => 12 (setq eval-expression-print-length nil) (message "%s" l) => (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
Tags: emacs

Interesting Links for 01-19-2009

January 20, 2009 00:02
Tags: del.icio.us

Emacs function of the day: (make-indirect-buffer)

January 17, 2009 14:19
(make-indirect-buffer base-buffer name &optional clone)
Create and return an indirect buffer for buffer base-buffer, named name. base-buffer should be a live buffer, or the name of an existing buffer. name should be a string which is not the name of an existing buffer. Optional argument clone non-nil means preserve base-buffer's state, such as major and minor modes, in the indirect buffer. clone nil means the indirect buffer's state is reset to default values.

Ran across this function today. Occasionally I want to have the same file open to different locations in different frames. You can do this, but when you change buffers in one of those frames, you lose the location of your point. (make-indirect-buffer) solves this problem quite nicely.

Its always fun to learn a new useful emacs function.

Tags: emacs

Interesting Links for 01-07-2009

January 08, 2009 21:06
Tags: del.icio.us

Interesting Links for 2008-31-12

January 01, 2009 05:04
Tags: del.icio.us
Next page

Links

Redsox

No game today