From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Eli Barzilay , 4118@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 11 Aug 2009 11:05:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124998813920898 (code B ref -1); Tue, 11 Aug 2009 11:05:08 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 11 Aug 2009 10:55:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 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 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 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 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 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 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 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 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19073.20002.692770.552510@winooski.ccs.neu.edu> Date: Tue, 11 Aug 2009 06:55:30 -0400 To: bug-gnu-emacs@gnu.org 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) 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... From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Juri Linkov , 4118@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 12 Aug 2009 23:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12501185507847 (code B ref -1); Wed, 12 Aug 2009 23:15:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Aug 2009 23:09:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 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 n7CN98Pj007844 for ; Wed, 12 Aug 2009 16:09:09 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbMwN-0001md-PG for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 19:09:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbMwJ-0001lX-0B for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 19:09:07 -0400 Received: from [199.232.76.173] (port=44676 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbMwI-0001lJ-RL for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 19:09:02 -0400 Received: from smtp-out1.starman.ee ([85.253.0.3]:37970 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbMwI-0003U5-3p for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2009 19:09:02 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.68.109.cable.starman.ee [82.131.68.109]) by mx1.starman.ee (Postfix) with ESMTP id 3739A3F41B5; Thu, 13 Aug 2009 02:08:56 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: 4118@debbugs.gnu.org, bug-gnu-emacs@gnu.org Organization: JURTA References: <19073.20002.692770.552510@winooski.ccs.neu.edu> Date: Wed, 12 Aug 2009 23:57:59 +0300 In-Reply-To: <19073.20002.692770.552510@winooski.ccs.neu.edu> (Eli Barzilay's message of "Tue, 11 Aug 2009 06:55:30 -0400") Message-ID: <87ocqkfxa5.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 > `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? > 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. Sometimes I use `C-x C-e C-u C-x C-e' to insert other representations to the current buffer to be able to copy their values as text. Of course, it's possible to copy them from the *Messages* buffer, but this is less convenient. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Eli Barzilay , 4118@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 01:25:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125012631328034 (code B ref -1); Thu, 13 Aug 2009 01:25:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 13 Aug 2009 01:18:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 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 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 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 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 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 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 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19075.27103.685992.984191@winooski.ccs.neu.edu> Date: Wed, 12 Aug 2009 21:18:23 -0400 To: Juri Linkov Cc: 4118@debbugs.gnu.org, bug-gnu-emacs@gnu.org In-Reply-To: <87ocqkfxa5.fsf@mail.jurta.org> References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <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 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! From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Juri Linkov , 4118@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 13 Aug 2009 23:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4118-submit@emacsbugs.donarmstrong.com id=B4118.12502071295697 (code B ref 4118); Thu, 13 Aug 2009 23:50:04 +0000 Received: (at 4118) by emacsbugs.donarmstrong.com; 13 Aug 2009 23:45:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7DNjQSZ005692 for <4118@emacsbugs.donarmstrong.com>; Thu, 13 Aug 2009 16:45:28 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.55.163.cable.starman.ee [82.131.55.163]) by mx1.starman.ee (Postfix) with ESMTP id D5E663F43A3; Fri, 14 Aug 2009 02:45:20 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: 4118@debbugs.gnu.org Organization: JURTA References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> <19075.27103.685992.984191@winooski.ccs.neu.edu> Date: Fri, 14 Aug 2009 02:33:46 +0300 In-Reply-To: <19075.27103.685992.984191@winooski.ccs.neu.edu> (Eli Barzilay's message of "Wed, 12 Aug 2009 21:18:23 -0400") Message-ID: <87fxbvp9e5.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> 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))) > ...)) The reason not to print the extra information on the first invocation of `eval-last-sexp' is the following. Most often users want to see the integer result of the evaluated expression, but the extra information also contains a character representation of this integer that might print some unrelated character that might load some weird fonts the user doesn't want to load. > 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... When the current buffer contains an integer, typing `C-x C-e' twice inserts it to the same buffer as a character. However, this is not too convenient, so I'd like to improve this interface. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Eli Barzilay , 4118@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 14 Aug 2009 01:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4118-submit@emacsbugs.donarmstrong.com id=B4118.125021312022566 (code B ref 4118); Fri, 14 Aug 2009 01:30:03 +0000 Received: (at 4118) by emacsbugs.donarmstrong.com; 14 Aug 2009 01:25:20 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.3 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7E1PIZq022563 for <4118@emacsbugs.donarmstrong.com>; Thu, 13 Aug 2009 18:25:19 -0700 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1MblXh-00004u-Tt; Thu, 13 Aug 2009 21:25:17 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19076.48381.916404.208797@winooski.ccs.neu.edu> Date: Thu, 13 Aug 2009 21:25:17 -0400 To: Juri Linkov Cc: 4118@debbugs.gnu.org In-Reply-To: <87fxbvp9e5.fsf@mail.jurta.org> References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> <19075.27103.685992.984191@winooski.ccs.neu.edu> <87fxbvp9e5.fsf@mail.jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.1 On Aug 14, Juri Linkov wrote: > >> 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))) > > ...)) > > The reason not to print the extra information on the first > invocation of `eval-last-sexp' is the following. Most often users > want to see the integer result of the evaluated expression, but the > extra information also contains a character representation of this > integer that might print some unrelated character that might load > some weird fonts the user doesn't want to load. In that case the obvious way to do this is to not print the character form if it requires such a font. If this is not easy to do, then making it work only for ASCII seems better than the current weird behavior. (The reason I consider it weird is that I managed to use Emacs for more than 15 years without noticing it.) > > 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... > > When the current buffer contains an integer, typing `C-x C-e' twice > inserts it to the same buffer as a character. However, this is not > too convenient, so I'd like to improve this interface. The main point (IMO) of making it consistent is keyboard macros, and in that case, if you want the character, then it's easy to just wrap an (insert ...) around the expression. Using it to insert the character and then removing all the preceding text is much more difficult for that. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Juri Linkov , 4118@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 14 Aug 2009 23:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4118-submit@emacsbugs.donarmstrong.com id=B4118.125029218713785 (code B ref 4118); Fri, 14 Aug 2009 23:30:04 +0000 Received: (at 4118) by emacsbugs.donarmstrong.com; 14 Aug 2009 23:23:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7ENN67U013781 for <4118@emacsbugs.donarmstrong.com>; Fri, 14 Aug 2009 16:23:07 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.30.119.cable.starman.ee [82.131.30.119]) by mx1.starman.ee (Postfix) with ESMTP id 6E3CC3F435F; Sat, 15 Aug 2009 02:23:00 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: 4118@debbugs.gnu.org Organization: JURTA References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> <19075.27103.685992.984191@winooski.ccs.neu.edu> <87fxbvp9e5.fsf@mail.jurta.org> <19076.48381.916404.208797@winooski.ccs.neu.edu> Date: Sat, 15 Aug 2009 01:54:10 +0300 In-Reply-To: <19076.48381.916404.208797@winooski.ccs.neu.edu> (Eli Barzilay's message of "Thu, 13 Aug 2009 21:25:17 -0400") Message-ID: <87y6pm6kwt.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> The reason not to print the extra information on the first >> invocation of `eval-last-sexp' is the following. Most often users >> want to see the integer result of the evaluated expression, but the >> extra information also contains a character representation of this >> integer that might print some unrelated character that might load >> some weird fonts the user doesn't want to load. > > In that case the obvious way to do this is to not print the character > form if it requires such a font. If this is not easy to do, then > making it work only for ASCII seems better than the current weird > behavior. (The reason I consider it weird is that I managed to use > Emacs for more than 15 years without noticing it.) There is no way to guess whether the user want to see the character (however weird it is) or not. > The main point (IMO) of making it consistent is keyboard macros, and > in that case, if you want the character, then it's easy to just wrap > an (insert ...) around the expression. Using it to insert the > character and then removing all the preceding text is much more > difficult for that. 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-/. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Eli Barzilay , 4118@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Aug 2009 01:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4118-submit@emacsbugs.donarmstrong.com id=B4118.12503003254844 (code B ref 4118); Sat, 15 Aug 2009 01:45:03 +0000 Received: (at 4118) by emacsbugs.donarmstrong.com; 15 Aug 2009 01:38:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7F1chnX004841 for <4118@emacsbugs.donarmstrong.com>; Fri, 14 Aug 2009 18:38:45 -0700 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1Mc8EE-0008Ex-L5; Fri, 14 Aug 2009 21:38:42 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19078.4514.641879.952867@winooski.ccs.neu.edu> Date: Fri, 14 Aug 2009 21:38:42 -0400 To: Juri Linkov Cc: 4118@debbugs.gnu.org In-Reply-To: <87y6pm6kwt.fsf@mail.jurta.org> References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> <19075.27103.685992.984191@winooski.ccs.neu.edu> <87fxbvp9e5.fsf@mail.jurta.org> <19076.48381.916404.208797@winooski.ccs.neu.edu> <87y6pm6kwt.fsf@mail.jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.1 On Aug 15, Juri Linkov wrote: > >> The reason not to print the extra information on the first > >> invocation of `eval-last-sexp' is the following. Most often users > >> want to see the integer result of the evaluated expression, but the > >> extra information also contains a character representation of this > >> integer that might print some unrelated character that might load > >> some weird fonts the user doesn't want to load. > > > > In that case the obvious way to do this is to not print the > > character form if it requires such a font. If this is not easy to > > do, then making it work only for ASCII seems better than the > > current weird behavior. (The reason I consider it weird is that I > > managed to use Emacs for more than 15 years without noticing it.) > > There is no way to guess whether the user want to see the character > (however weird it is) or not. The weird thing is not showing the character -- it is the fact that the extra information is "sometimes there" -- it is the fact that the behavior depends on whether the command was issued two times in a row. > > The main point (IMO) of making it consistent is keyboard macros, > > and in that case, if you want the character, then it's easy to > > just wrap an (insert ...) around the expression. Using it to > > insert the character and then removing all the preceding text is > > much more difficult for that. > > 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. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Juri Linkov , 4118@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 15 Aug 2009 23:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4118-submit@emacsbugs.donarmstrong.com id=B4118.12503786076345 (code B ref 4118); Sat, 15 Aug 2009 23:30:04 +0000 Received: (at 4118) by emacsbugs.donarmstrong.com; 15 Aug 2009 23:23:27 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7FNNPNo006339 for <4118@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 16:23:26 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.53.206.cable.starman.ee [82.131.53.206]) by mx1.starman.ee (Postfix) with ESMTP id A76B83F434D; Sun, 16 Aug 2009 02:23:19 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: 4118@debbugs.gnu.org Organization: JURTA References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> <19075.27103.685992.984191@winooski.ccs.neu.edu> <87fxbvp9e5.fsf@mail.jurta.org> <19076.48381.916404.208797@winooski.ccs.neu.edu> <87y6pm6kwt.fsf@mail.jurta.org> <19078.4514.641879.952867@winooski.ccs.neu.edu> Date: Sun, 16 Aug 2009 02:16:56 +0300 In-Reply-To: <19078.4514.641879.952867@winooski.ccs.neu.edu> (Eli Barzilay's message of "Fri, 14 Aug 2009 21:38:42 -0400") Message-ID: <87eircy8ev.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> 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. 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'. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Eli Barzilay , 4118@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 16 Aug 2009 00:05:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4118-submit@emacsbugs.donarmstrong.com id=B4118.125038082312601 (code B ref 4118); Sun, 16 Aug 2009 00:05:10 +0000 Received: (at 4118) by emacsbugs.donarmstrong.com; 16 Aug 2009 00:00:23 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7G00L5u012594 for <4118@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 17:00:22 -0700 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1McTAb-0006uy-1V; Sat, 15 Aug 2009 20:00:21 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19079.19477.34624.793366@winooski.ccs.neu.edu> Date: Sat, 15 Aug 2009 20:00:21 -0400 To: Juri Linkov Cc: 4118@debbugs.gnu.org In-Reply-To: <87eircy8ev.fsf@mail.jurta.org> References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> <19075.27103.685992.984191@winooski.ccs.neu.edu> <87fxbvp9e5.fsf@mail.jurta.org> <19076.48381.916404.208797@winooski.ccs.neu.edu> <87y6pm6kwt.fsf@mail.jurta.org> <19078.4514.641879.952867@winooski.ccs.neu.edu> <87eircy8ev.fsf@mail.jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.1 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 this: 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! From cyd@stupidchicken.com Sun Aug 16 07:51:07 2009 Received: (at control) by emacsbugs.donarmstrong.com; 16 Aug 2009 14:51:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7GEp6iT001724 for ; Sun, 16 Aug 2009 07:51:07 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 8A23557E25D; Sun, 16 Aug 2009 10:52:05 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: severity 4118 wishlist Date: Sun, 16 Aug 2009 10:52:05 -0400 Message-ID: <871vnb24mi.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii severity 4118 wishlist reassign 4158 spam reassign 4159 spam reassign 4160 spam thanks From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Juri Linkov , 4118@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 17 Aug 2009 01:35:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4118-submit@emacsbugs.donarmstrong.com id=B4118.125047258519328 (code B ref 4118); Mon, 17 Aug 2009 01:35:05 +0000 Received: (at 4118) by emacsbugs.donarmstrong.com; 17 Aug 2009 01:29:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7H1Th9b019325 for <4118@emacsbugs.donarmstrong.com>; Sun, 16 Aug 2009 18:29:45 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.54.10.cable.starman.ee [82.131.54.10]) by mx1.starman.ee (Postfix) with ESMTP id ACFFD3F429B; Mon, 17 Aug 2009 04:29:37 +0300 (EEST) From: Juri Linkov To: Eli Barzilay Cc: 4118@debbugs.gnu.org Organization: JURTA References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> <19075.27103.685992.984191@winooski.ccs.neu.edu> <87fxbvp9e5.fsf@mail.jurta.org> <19076.48381.916404.208797@winooski.ccs.neu.edu> <87y6pm6kwt.fsf@mail.jurta.org> <19078.4514.641879.952867@winooski.ccs.neu.edu> <87eircy8ev.fsf@mail.jurta.org> <19079.19477.34624.793366@winooski.ccs.neu.edu> Date: Mon, 17 Aug 2009 03:52:08 +0300 In-Reply-To: <19079.19477.34624.793366@winooski.ccs.neu.edu> (Eli Barzilay's message of "Sat, 15 Aug 2009 20:00:21 -0400") Message-ID: <87tz07z133.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > 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. Then maybe the same scheme should be applied to `eval-expression' (`M-:') as well. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Fri Sep 05 11:52:37 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient Reply-To: Eli Barzilay , 4118@debbugs.gnu.org Resent-From: Eli Barzilay Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 17 Aug 2009 03:25:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4118 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4118-submit@emacsbugs.donarmstrong.com id=B4118.12504791417037 (code B ref 4118); Mon, 17 Aug 2009 03:25:07 +0000 Received: (at 4118) by emacsbugs.donarmstrong.com; 17 Aug 2009 03:19:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7H3Ixk9007034 for <4118@emacsbugs.donarmstrong.com>; Sun, 16 Aug 2009 20:19:00 -0700 Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1McskN-0008Nj-AL; Sun, 16 Aug 2009 23:18:59 -0400 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19080.52259.310162.933099@winooski.ccs.neu.edu> Date: Sun, 16 Aug 2009 23:18:59 -0400 To: Juri Linkov Cc: 4118@debbugs.gnu.org In-Reply-To: <87tz07z133.fsf@mail.jurta.org> References: <19073.20002.692770.552510@winooski.ccs.neu.edu> <87ocqkfxa5.fsf@mail.jurta.org> <19075.27103.685992.984191@winooski.ccs.neu.edu> <87fxbvp9e5.fsf@mail.jurta.org> <19076.48381.916404.208797@winooski.ccs.neu.edu> <87y6pm6kwt.fsf@mail.jurta.org> <19078.4514.641879.952867@winooski.ccs.neu.edu> <87eircy8ev.fsf@mail.jurta.org> <19079.19477.34624.793366@winooski.ccs.neu.edu> <87tz07z133.fsf@mail.jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.1 On Aug 17, Juri Linkov wrote: > > 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. > > Then maybe the same scheme should be applied to `eval-expression' > (`M-:') as well. Yes, that sounds good to me. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From unknown Fri Sep 05 11:52:37 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eli Barzilay Subject: bug#4118: closed (bug#4118: 23.1; eval-last-sexp-print-value is inconvenient) Message-ID: References: <19073.20002.692770.552510@winooski.ccs.neu.edu> X-Gnu-PR-Message: they-closed 4118 X-Gnu-PR-Package: emacs Reply-To: 4118@debbugs.gnu.org Date: Wed, 15 Jun 2016 00:37:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1465951022-20201-1" This is a multi-part message in MIME format... ------------=_1465951022-20201-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #4118: 23.1; eval-last-sexp-print-value is inconvenient which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 4118@debbugs.gnu.org. --=20 4118: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4118 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1465951022-20201-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4118-done) by debbugs.gnu.org; 15 Jun 2016 00:36:06 +0000 Received: from localhost ([127.0.0.1]:40974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCyoP-0005EY-NB for submit@debbugs.gnu.org; Tue, 14 Jun 2016 20:36:05 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:34360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCyoO-0005E3-1x for 4118-done@debbugs.gnu.org; Tue, 14 Jun 2016 20:36:04 -0400 Received: by mail-oi0-f50.google.com with SMTP id d132so10631694oig.1 for <4118-done@debbugs.gnu.org>; Tue, 14 Jun 2016 17:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=i6aYuEHHom9yG/SNMXcv2YBpIpzqxpy7u7QoBm2wyas=; b=T5fWTCV6NLmrqbyZKlP5STRiFkagyaiBi7ADdqRusm1AkWM2nM3zoaMjQxTAESf3Tl iYRVOjn2lYtnIwjALl+4HKWQltYCbBEYaFsACViD0Z5vrRzaInpRr/i1bFRpfZbClhIt 9yXTzSm8vKPhqC0YPTbA5q+TRySxWGJdcLqCsR7qbdwe9iOlpkBShvRxeutlnaEGXsNW qSl702aKusVyIY9aEY3tYBLCc4xg7/hl4pPE+kOt3JPWvrjglZt7G7zdShXh7cP/tD+s 0n3ibV3WNMXgeF7NLxwJ+eliCTn74JbPcEGUqeCBlK0rwzK7L8vk5qz6J8XNYsHKcmGb Oamw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=i6aYuEHHom9yG/SNMXcv2YBpIpzqxpy7u7QoBm2wyas=; b=EIA41keaMVJPepB2cUmK1Jwh/FrRKDYHo0upUALf2UDlPSzn/tDQ6mq11GR/bkplin tBR5S+vVO7kI8hjooUJANpCYHUpH0m7az3yfyY8kJtH6IYDQWMIyxpyQ48ghvXTv5RPu TqysGCb5eOo0QaPVv44JlXy2Xd9sYZvT0yTEgA4Aoza1bDp4uDhZBnPgjHgV33KgaPwW t0oF1SqBKArf5IwBl7pTT+GocoE3wz7KWpSrwX8qS7xZ7yewm3swM/HzgGmuCk/Hf0NT DxZ8xxrByLWzsmSxAxaMQfGe32M8Ks8KFx5XHbNYoa8POkH2c7qGuy2jM+h0apEB/hEI kBEw== X-Gm-Message-State: ALyK8tIiWvJ446Gjs3HYMBEIkwwi6AUqDQCvGymmMb0zc8m0FHZ/nVp6diDHM+3Wan/dTCcRXNX8lbMH2nJmrQ== X-Received: by 10.202.51.133 with SMTP id z127mr10195149oiz.202.1465950958471; Tue, 14 Jun 2016 17:35:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.44.103 with HTTP; Tue, 14 Jun 2016 17:35:57 -0700 (PDT) From: Noam Postavsky Date: Tue, 14 Jun 2016 20:35:57 -0400 X-Google-Sender-Auth: lHweDag8eT1HoTRNJe_pIg6k42Q Message-ID: Subject: bug#4118: 23.1; eval-last-sexp-print-value is inconvenient To: 4118-done@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 4118-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) 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. [...]" ------------=_1465951022-20201-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 11 Aug 2009 10:55:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 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 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 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 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 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 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 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 From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19073.20002.692770.552510@winooski.ccs.neu.edu> Date: Tue, 11 Aug 2009 06:55:30 -0400 To: bug-gnu-emacs@gnu.org Subject: 23.1; eval-last-sexp-print-value is inconvenient 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) 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... ------------=_1465951022-20201-1--