emacs-devel
[Top][All Lists]
Advanced

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

RE: C-x C-e with prefix arg


From: Drew Adams
Subject: RE: C-x C-e with prefix arg
Date: Mon, 6 May 2013 07:11:45 -0700

> There are many other commands that change their behavior when 
> called twice, e.g. running `recenter' twice doesn't recenter
> but unexpectedly moves the current line to window's top.
> Do you think that typing `C-l' twice is dumb and should be
> ripped out and reverted to the longstanding recentering
> functionality because there are other ways to do that?
> (This question is rhetorical, I don't want to remove it.)

No, I don't think removing that `C-l' enhancement would be an improvement (as
might be expected, since adding it was my idea).

The behavior a given command should have depends on the command (duh).  `C-l'
moves the window around point.  Repeating it just moves the window to two other
positions around point.  Pretty natural.  And a prefix arg gives more precise
control over the positioning.

`C-x C-e' etc. are about evaluating a sexp.  Letting you optionally (and not by
default) print that value in the current buffer is a natural extension.

I don't see the integer radix printing in the same way.  Rather, as you suggest
below, it is about formatting the value in a different way.  That is, it is more
akin to the formatting that `eval-expression-print-length' and
`eval-expression-print-level' do.

> > But I doubt the feature will be removed in consequence.
> 
> The feature could be removed if we will find a better replacement.
> I see at least two alternatives to improve the `eval-expression'
> functionality:
> 
> 1. Use the prefix arg `M-0' to request more information about 
>    the value
>    printed by `C-x C-e', `M-:', and `C-j'.  Then typing `M-0 C-x C-e'
>    will have the same effect as typing `C-x C-e' twice (the same way
>    as typing `M-0 C-l' has the same effect as typing `C-l' twice).

I have no great objection.  But I prefer your other suggestion:

> 2. Add a new customizable option to define the default printing format
>    for the numeric values printed by `C-x C-e', `M-:', and `C-j'
>    to accompany two other existing options
>    `eval-expression-print-length' and `eval-expression-print-level'
>    that define the format of the list values while printing list
>    value in `eval-expression'.

That makes sense to me.  And like those other options, it should be ignored
except via `C--' or `M--'.




reply via email to

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