GNU bug report logs -
#4118
23.1; eval-last-sexp-print-value is inconvenient
Previous Next
Reported by: Eli Barzilay <eli <at> barzilay.org>
Date: Tue, 11 Aug 2009 11:05:08 UTC
Severity: wishlist
Fixed in version 24.4
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 14 Jun 2016 20:35:57 -0400
with message-id <CAM-tV-_v9zbMvdB+HoAihgw9oBXDe9AQwd5+G5G2GpuHshHiXg <at> mail.gmail.com>
and subject line bug#4118: 23.1; eval-last-sexp-print-value is inconvenient
has caused the debbugs.gnu.org bug report #4118,
regarding 23.1; eval-last-sexp-print-value is inconvenient
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
4118: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4118
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
`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). This is cute to have on the echo area, but annoying for
such use in macros. It would be better to disable this extra output
in the case of non-echo-area output.
I have a rather simple solution -- redefine the
`eval-last-sexp-print-value' function with an extra condition
(let ((str (and (eq standard-output t) ; <--- HERE
(eval-expression-print-format value))))
(if str (princ str)))
which works reasonably well.
In GNU Emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.14)
of 2009-08-01 on winooski.ccs.neu.edu
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure '--prefix=/home/eli/bin/local/emacs-dir''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: POSIX
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US
value of $XMODIFIERS: nil
locale-coding-system: iso-latin-1-unix
default-enable-multibyte-characters: t
Major mode: Text
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x r e p o <tab> r <tab> <return>
Recent messages:
Loading ~/MyEmacs/pre...done
Loading ~/EliEmacs/eliemacs...done
Loading ~/MyEmacs/post...done
Making completion list...
[Message part 3 (message/rfc822, inline)]
Version: 24.4
This was fixed along with #12985 by b41594fd (Thu Dec 19 23:02:46 2013 +0200)
"* lisp/simple.el (eval-expression-print-format): Don't check for
command names and the last command. Always display additional
formats of the integer result in the echo area, and insert them
to the current buffer only with a zero prefix arg.
Display character when char-displayable-p is non-nil.
(eval-expression): With a zero prefix arg, set `print-length' and
`print-level' to nil, and insert the integer values from
`eval-expression-print-format' at the end. Doc fix.
[...]"
This bug report was last modified 9 years and 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.