[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-x C-e with prefix arg

From: Juri Linkov
Subject: Re: C-x C-e with prefix arg
Date: Sun, 05 May 2013 11:57:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> How about letting a non-negative prefix arg insert the full value (in effect,
> binding `eval-expression-print-length' and `eval-expression-print-level' to
> nil)?  And letting a negative prefix arg do what any prefix arg does today:
> respect the current values of `eval-expression-print-length' and
> `eval-expression-print-level'?

Why a numeric prefix arg?  A numeric prefix usually defines countable elements,
e.g. for this case it could define the number of values to insert to the buffer
or the depth of list nesting to print.  Otherwise, a better prefix to toggle
would be `C-u' or `M-0'.  Consider the prefixes of the related commands that

1. insert to the buffer

   C-u M-x shell-command RET
   C-u M-x eval-last-sexp RET
   M-x eval-print-last-sexp RET

2. print full information

   C-u M-x what-cursor-position RET
   M-0 M-x dired-copy-filename-as-kill RET
   M-0 M-x Info-copy-current-node-name RET
   M-x eval-last-sexp RET M-x eval-last-sexp RET
   M-x eval-expression RET

Perhaps `M-0' is more suitable than `C-u' to print full information
(or the full value) where the mnemonics of `M-0' could be
"Reset `eval-expression-print-length' to nil".

See also bug#12985 for discussion about adding a prefix argument
to `eval-last-sexp' to toggle full information (or the full value).
They could be toggled simultaneously because printing the full value
with a nil `eval-expression-print-level' is applicable only to lists,
and printing full information (octal and hex representations, etc)
is applicable only to numeric values.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]