[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 22:50:35 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> We should pick the most appropriate, most useful prefix-arg behavior
> _for the particular command_.

A numeric prefix arg is not the most appropriate, most useful
prefix-arg behavior for the particular command `eval-last-sexp'.
E.g. `C-u -42 C-x C-e' is useless and meaningless for binding
`eval-expression-print-length' and `eval-expression-print-level'
to nil (or using their default values that differ from the arg value).

>> 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.
> If you want to propose either of those, go for it.

I don't want to propose those now, but we should try to reserve
numeric prefixes for features where numbers make sense like
e.g. `C-u -42 C-x C-e' to bind `eval-expression-print-length' to the
numeric arg 42, or `C-u 42 C-x C-e' to bind `eval-expression-print-level'
to the given number.

> * Negative in this case is mnemonic for "less".  It hints at the
> elision/abbreviation.

Fine, then use the symbol `-' (just a minus sign) as the prefix arg.

> `M-0' is "usually" for counting and should mean only zero inserts or
> zeroth print level

Which is the most appropriate prefix where zero means to bind
`eval-expression-print-length' and `eval-expression-print-level'
to nil.

> IMHO, the proposal I made is better, but I really don't care.  I never use
> either `eval-last-sexp' or `eval-print-last-sexp', personally.  I use
> `pp-eval-last-sexp' instead (and my own version of it), and I use *scratch* in
> Emacs-Lisp mode (so C-j is not `eval-print-last-sexp').

I like your proposal, but I strive to find the most appropriate prefix arg
that could be shared between lists and numeric output of `C-x C-e', `M-:',
and `C-j'. i.e. the same prefix arg to define whether to print the full
list value or not, and whether to print full information about numbers
(octal, hexadecimal).  This is required for bug#12985.

reply via email to

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