[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: Eli Barzilay
Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient
Date: Sat, 15 Aug 2009 20:00:21 -0400

On Aug 16, Juri Linkov wrote:
> >> Wrapping an (insert ...) around the expression is not as easy as
> >> typing `C-u C-x C-e', copying the character and undoing the change
> >> with C-/.
> >
> > ...and this is a good description for a solution: have it print out
> > the extra information only on something like an explicit positive
> > prefix argument (eg, C-u C-1 C-x C-e), and otherwise don't show it.
> And then the number could mean the verbosity level, e.g. `C-1 C-x
> C-e' prints octal and hex, and `C-2 C-x C-e' prints octal, hex and a
> character.

Cute idea,

> But I don't see how to insert different representations to the
> current buffer instead of displaying them in the echo area since
> `C-u C-1 C-x C-e' and `C-1 C-x C-e' have the same numeric argument
> `1'.

but yes, that won't work as is.  It could work as a verbosity level
indicator for insertion into the buffer, and echo-area messages could
still do the different output based on the number of times it was
called.  The echo area messages won't be consistent but that's not as
important.  And negative prefixes could be used for those rare cases
where you want the verbose output into the echo area.  Something like

  A prefix of
    1 (or just C-u) -> output a plain number into the buffer
    2 -> number + alternative radix outputs into the buffer
    3 -> number + alternates + character into the buffer
    -1, -2, -3 -> same as above, but for the echo area
  And the above always behaves the same.

  *No* prefix means:
    show the plain number output in the echo area on first use
    number + alternates on second use (with no prefix, of course)
    number + alternates + character on the third use.

          ((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]