From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Date: Tue, 11 Aug 2009 06:55:30 -0400 Message-ID: <19073.20002.692770.552510@winooski.ccs.neu.edu> Reply-To: Eli Barzilay , 4118@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249988837 14930 80.91.229.12 (11 Aug 2009 11:07:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2009 11:07:17 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 11 13:07:09 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MapC6-0007ex-Gw for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Aug 2009 13:07:07 +0200 Original-Received: from localhost ([127.0.0.1]:55888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MapC5-0006RK-4U for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Aug 2009 07:07:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MapBx-0006Qc-Ld for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 07:06:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MapBs-0006N0-VS for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 07:06:57 -0400 Original-Received: from [199.232.76.173] (port=57607 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MapBr-0006Mq-MQ for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 07:06:51 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:36591) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MapBq-0005LA-Qd for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 07:06:51 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BB6mLd022609; Tue, 11 Aug 2009 04:06:49 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7BB58bK021827; Tue, 11 Aug 2009 04:05:08 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Barzilay Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 11 Aug 2009 11:05:08 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124998813920898 (code B ref -1); Tue, 11 Aug 2009 11:05:08 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 11 Aug 2009 10:55:39 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BAtc8J020895 for ; Tue, 11 Aug 2009 03:55:39 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Map0z-0008Pi-UV for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 06:55:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Map0v-0008P1-71 for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 06:55:37 -0400 Original-Received: from [199.232.76.173] (port=38946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Map0u-0008Ot-DO for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 06:55:32 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:62410) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Map0t-0002PN-Hs for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 06:55:31 -0400 Original-Received: from winooski.ccs.neu.edu ([129.10.115.117] helo=barzilay.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Map0s-0001mY-Nn for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 06:55:30 -0400 Original-Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1Map0s-0003JN-Mi for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 06:55:30 -0400 X-Mailer: VM 7.19 under Emacs 22.1.1 X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Tue, 11 Aug 2009 07:06:57 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30094 Archived-At: 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 r Recent messages: Loading ~/MyEmacs/pre...done Loading ~/EliEmacs/eliemacs...done Loading ~/MyEmacs/post...done Making completion list...