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: Wed, 12 Aug 2009 21:18:23 -0400 Message-ID: <19075.27103.685992.984191@winooski.ccs.neu.edu> References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> 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 1250126832 21303 80.91.229.12 (13 Aug 2009 01:27:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2009 01:27:12 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, 4118@emacsbugs.donarmstrong.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 13 03:27:05 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 1MbP5r-0007KX-UJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Aug 2009 03:27:04 +0200 Original-Received: from localhost ([127.0.0.1]:52881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbP5p-0007ZF-7r for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Aug 2009 21:27:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbP5l-0007Z2-6c for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 21:26:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbP5g-0007Xo-Jc for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 21:26:56 -0400 Original-Received: from [199.232.76.173] (port=47958 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbP5g-0007Xi-4F for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 21:26:52 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45470) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbP5f-0005ei-JA for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 21:26: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 n7D1QnFO029104; Wed, 12 Aug 2009 18:26:49 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7D1P5aI028824; Wed, 12 Aug 2009 18:25:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Barzilay Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 01:25:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125012631328034 (code B ref -1); Thu, 13 Aug 2009 01:25:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 13 Aug 2009 01:18:33 +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 n7D1IV4k028031 for ; Wed, 12 Aug 2009 18:18:32 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbOxb-0005B6-2Z for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 21:18:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbOxW-0005AU-JJ for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 21:18:30 -0400 Original-Received: from [199.232.76.173] (port=51671 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbOxW-0005AR-Dp for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 21:18:26 -0400 Original-Received: from winooski.ccs.neu.edu ([129.10.115.117]:57075 helo=barzilay.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbOxW-0004fc-6l for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 21:18:26 -0400 Original-Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1MbOxT-00020L-MT; Wed, 12 Aug 2009 21:18:23 -0400 In-Reply-To: <87ocqkfxa5.fsf@mail.jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-CrossAssassin-Score: 2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 12 Aug 2009 21:26:56 -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:30139 Archived-At: 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!