[Top][All Lists]

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

bug#4118: 23.1; eval-last-sexp-print-value is inconvenient

From: Juri Linkov
Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient
Date: Fri, 14 Aug 2009 02:33:46 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

>> But it inserts other representations only when you type `C-x C-e' twice.
>> Do you mean you don't want this after the second `C-x C-e' key press?
> Hmm, I see that the reason for what I've seen is that I'm using it
> indirectly through my own function, and for some reason
> `eval-expression-print-format' decides whether to do its thing based
> on the current command.  This looks like an odd interface...  A better
> and more consistent interface seems to me to always print the extra
> information unless it goes into a buffer -- something like:
>   (defun eval-expression-print-format (value)
>     ...
>     (if (and (integerp value) (not (bufferp standard-output)))
>         ...))

The reason not to print the extra information on the first invocation of
`eval-last-sexp' is the following.  Most often users want to see the integer
result of the evaluated expression, but the extra information also contains
a character representation of this integer that might print some unrelated
character that might load some weird fonts the user doesn't want to load.

> But you seem to suggest that there are practical uses to get that
> extra stuff into the buffer?  I don't see any occasion that would make
> it desirable...

When the current buffer contains an integer, typing `C-x C-e' twice
inserts it to the same buffer as a character.  However, this is
not too convenient, so I'd like to improve this interface.

Juri Linkov

reply via email to

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