2012-05-23 78 views
3

如果我做C-ùM-:(插入口齿不清语句到缓冲区的结果),然后我做这样的事情:如何用elisp在缓冲区中插入一个lenghthier列表?

(progn (setq x 0 l '()) (while(< x 30) (push (random 99) l) (incf x 1)) (nreverse l)) 

我得到:

(89 29 27 23 56 88 37 11 33 20 98 95 ...) 

尾随省略号。这是什么方法?像结果列表中的缓冲区插入一样。

回答

6

尝试

(setq eval-expression-print-length nil) 

中的.emacs

1

M-:(insert (pp (loop repeat 30 collect (random 99))))

可能需要(require 'cl)第一。

+0

对于我从未注意过的'pp'。我认为它是'prin1'的安全替代品(或者'prin1-to-string'的'pp-to-string'),但是更好的格式为人类可读性(基于'C-h i g(elisp)Output Functions')。) – phils

相关问题