bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Eli Barzilay
Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient
Date: Wed, 12 Aug 2009 21:18:23 -0400

On Aug 12, Juri Linkov wrote:
> >   `eval-last-sexp' is often useful with a prefix argument inside a
> >   buffer for all kinds of programmatic uses (for example, make a
> >   keyboard macro that massages some text into an S-expression,
> >   then use it to plant the result in the buffer).  This uses
> >   `eval-last-sexp-print-value', which will "helpfully" insert
> >   other junk into the buffer (the hex and the octal
> >   representations of the number).
> 
> 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)))
        ...))

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...

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!





reply via email to

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