From unknown Tue Jun 17 01:32:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12985: eval-last-sexp looks broken when executed twice Resent-From: Kelly Dean Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Nov 2012 01:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12985@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135380843220826 (code B ref -1); Sun, 25 Nov 2012 01:54:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Nov 2012 01:53:52 +0000 Received: from localhost ([127.0.0.1]:37167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TcRPr-0005Pq-Q9 for submit@debbugs.gnu.org; Sat, 24 Nov 2012 20:53:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54867) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TcRPp-0005Pj-7m for submit@debbugs.gnu.org; Sat, 24 Nov 2012 20:53:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TcROH-0001gk-P3 for submit@debbugs.gnu.org; Sat, 24 Nov 2012 20:52:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:35127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcROH-0001gg-MI for submit@debbugs.gnu.org; Sat, 24 Nov 2012 20:52:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcROG-0005uV-UQ for bug-gnu-emacs@gnu.org; Sat, 24 Nov 2012 20:52:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TcROF-0001gU-SB for bug-gnu-emacs@gnu.org; Sat, 24 Nov 2012 20:52:12 -0500 Received: from nm26-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.74]:30124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcROF-0001gD-Mj for bug-gnu-emacs@gnu.org; Sat, 24 Nov 2012 20:52:11 -0500 Received: from [98.139.212.147] by nm26.bullet.mail.bf1.yahoo.com with NNFMP; 25 Nov 2012 01:52:06 -0000 Received: from [98.139.215.252] by tm4.bullet.mail.bf1.yahoo.com with NNFMP; 25 Nov 2012 01:52:06 -0000 Received: from [127.0.0.1] by omp1065.mail.bf1.yahoo.com with NNFMP; 25 Nov 2012 01:52:06 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 476489.15231.bm@omp1065.mail.bf1.yahoo.com Received: (qmail 43332 invoked by uid 60001); 25 Nov 2012 01:52:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1353808326; bh=dgmK1FZ37YEwRg4gSq6PPEhsRXz+C/P+7xlmjsQxBZI=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=ap87JwwrAVvGzLFg7q5a1TM3MFxbIgP9B2kVw4QMsA6fCotHOzSGsGLmcIzZ+N4Rss26gOOmQTVL+GI6aq+wxgFPmaJ1+NCm95Fm1ebsoGua3EVtf/EjuhgQV99ExtjEa/ygPRnEUTZCnFLrBS1ZRCBfqq5O0IAsp5jHvDzErW4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=YaXw48EDsGSX1mdYL/Phe2hGUuX2O84Y0b043tQcu/yg6le/stWg91JJv9EbNW+KRZydsJRCh30WDDD4Aznzfq+yxCS/y2dCuD2W7OJJNAyyqGkylpKBjCFK4oHVgFux/YNWQ2G6jT3mUBu9/+7tR7rFIEudvodR2XHKsdwSI8k=; X-YMail-OSG: RxLKtSIVM1nzKtKsWAEg3c3w7ZE9ciOiPwsYwlvsBZfq3xl 2uFPVHMFuLP3DitJd.OJrQ0cyJq75qsPVef9rN0KccF4lJyKFuqJ3_AwbYmL LMOPr2CxbjmQiU5FRwO_gZS4C9j4wTmSpeUBt9y1fsBR_.BVCZ8DbmoG6r4G IijQYfwDozvSAgctzzTFbVQJrAmBALONtOCJ3nVwaxWUiMWRKjkLNlszJwzJ PUDRM3sROLrZB0UhSoQrYpkoT_eltyfGWEF3q7Mvy3a30e4suqHdZ22_8L5F h31hlNBye55Q374Kwcn_hq4BhkL38Yl.zjLmzdHOVn8B7acNNJBtsuvLvCLu TTPPucDUIPDrHlRyzFWkwDk_e8llQou2ryEIZ18fhJnIp576Ea3.N1ZpOcMA cIZdzz8sxrnNc_nOqhVnTIVsOl5jHLlUkgHObjVMDgA-- Received: from [37.130.227.133] by web141103.mail.bf1.yahoo.com via HTTP; Sat, 24 Nov 2012 17:52:06 PST X-Rocket-MIMEInfo: 001.001, VXNpbmcgMjQuMiwgdHlwZToKNQpUaGVuIGRvIEMteCBDLWUsIGFuZCBhcyBleHBlY3RlZCBpdCBlY2hvZXM6CjUKQnV0IHRoZW4gZG8gQy14IEMtZSBhZ2FpbiwgYW5kIHVuZXhwZWN0ZWRseSBpdCBlY2hvZXM6CjUgKCNvNSwgI3g1LCA_XEMtZSkKVGhlIHNhbWUgdGhpbmcgaGFwcGVucyBpZiB5b3UgdHlwZSA1IHRoZW4gZG8gQy11IEMteCBDLWUgQy11IEMteCBDLWU7IGZpcnN0IGFzIGV4cGVjdGVkIHlvdSBnZXQ6CjU1ClRoZW4gdW5leHBlY3RlZGx5IHlvdSBnZXQ6CjU1NTUgKCNvNjcsICN4MzcsID83KQoBMAEBAQE- X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.123.460 Message-ID: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> Date: Sat, 24 Nov 2012 17:52:06 -0800 (PST) From: Kelly Dean MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Using 24.2, type: 5 Then do C-x C-e, and as expected it echoes: 5 But then do C-x C-e again, and unexpectedly it echoes: 5 (#o5, #x5, ?\C-e) The same thing happens if you type 5 then do C-u C-x C-e C-u C-x C-e; first as expected you get: 55 Then unexpectedly you get: 5555 (#o67, #x37, ?7) From unknown Tue Jun 17 01:32:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12985: eval-last-sexp looks broken when executed twice Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Nov 2012 08:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kelly Dean Cc: 12985@debbugs.gnu.org Received: via spool by 12985-submit@debbugs.gnu.org id=B12985.135383316131806 (code B ref 12985); Sun, 25 Nov 2012 08:46:02 +0000 Received: (at 12985) by debbugs.gnu.org; 25 Nov 2012 08:46:01 +0000 Received: from localhost ([127.0.0.1]:37392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TcXqj-0008Gw-Jy for submit@debbugs.gnu.org; Sun, 25 Nov 2012 03:46:01 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:55890) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TcXqh-0008Gp-G3 for 12985@debbugs.gnu.org; Sun, 25 Nov 2012 03:46:00 -0500 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3Y8PvB3ZFTz3hhdY; Sun, 25 Nov 2012 09:44:22 +0100 (CET) X-Auth-Info: SI8N+Xinv4Ris3/IgULeMOOga8EJqteuONJX7gXDA/8= Received: from linux.local (ppp-88-217-104-88.dynamic.mnet-online.de [88.217.104.88]) by mail.mnet-online.de (Postfix) with ESMTPA id 3Y8PvB14c0zbbgK; Sun, 25 Nov 2012 09:44:22 +0100 (CET) Received: by linux.local (Postfix, from userid 501) id 44EEB1E5613; Sun, 25 Nov 2012 09:44:19 +0100 (CET) From: Andreas Schwab References: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> X-Yow: I left my WALLET in the BATHROOM!! Date: Sun, 25 Nov 2012 09:44:18 +0100 In-Reply-To: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> (Kelly Dean's message of "Sat, 24 Nov 2012 17:52:06 -0800 (PST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Kelly Dean writes: > Using 24.2, type: > 5 > Then do C-x C-e, and as expected it echoes: > 5 > But then do C-x C-e again, and unexpectedly it echoes: > 5 (#o5, #x5, ?\C-e) It's not a bug, it's a feature of eval-expression-print-format. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Tue Jun 17 01:32:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12985: eval-last-sexp looks broken when executed twice References: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> Resent-From: Kelly Dean Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Nov 2012 12:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Andreas Schwab Cc: 12985@debbugs.gnu.org Received: via spool by 12985-submit@debbugs.gnu.org id=B12985.13540202152020 (code B ref 12985); Tue, 27 Nov 2012 12:44:02 +0000 Received: (at 12985) by debbugs.gnu.org; 27 Nov 2012 12:43:35 +0000 Received: from localhost ([127.0.0.1]:41270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TdKVj-0000WX-Dd for submit@debbugs.gnu.org; Tue, 27 Nov 2012 07:43:35 -0500 Received: from nm13.bullet.mail.bf1.yahoo.com ([98.139.212.172]:27404) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TdKVh-0000WN-Iy for 12985@debbugs.gnu.org; Tue, 27 Nov 2012 07:43:34 -0500 Received: from [98.139.215.142] by nm13.bullet.mail.bf1.yahoo.com with NNFMP; 27 Nov 2012 12:41:44 -0000 Received: from [98.139.212.238] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 27 Nov 2012 12:41:44 -0000 Received: from [127.0.0.1] by omp1047.mail.bf1.yahoo.com with NNFMP; 27 Nov 2012 12:41:44 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 845206.3766.bm@omp1047.mail.bf1.yahoo.com Received: (qmail 50224 invoked by uid 60001); 27 Nov 2012 12:41:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1354020104; bh=d8DrF8VvX2n6IqJyLhcst4cBFingITDTNO06oGmgl/g=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=UZit59YICVI4SxtwQOoYwCgjajQWcApCan710xSkiwOHD3QzhYzpMKRAOewrVP+lKxlNffD05ix+kriAOkDNBsFM3R+aDse4ws8jpmvsCuWm6bYBl+sNmX79Sun5+2uXZ72/MilYYmPQBP63h59ziPuYFPkmp5ohxgrHnHb/3Dc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=h7PKR47L7A2wQSaaJXP+WfGYurfqashK3njDsXDzYHbOu1R4G1TdZAsytvTQzxttIVqemcPW7AsOgZe+ql4Wb7yWZUgbY/ruR4Wo/I3VMtBgLZFIcpdpmObMLrGWJBJhYF0Z7ndUmOLUOog9FL6Wqt5UVYnqWBaJq8iG3+y+0Pg=; X-YMail-OSG: E0sbhI0VM1nbsXNI5unLOMqE7x07CoiXzivfN8jih0vnxd_ mO79vyKQKmeaRt_U5OJRl4IBUu.GJKjAR.O5hqbpGJwrqVK2CIK1xn8YBdn4 BPIcaWgd.WaF_l1pxqoxHTXp9IDf0p_FMBOpMoxQCWGFfTpxkt.5CSrtcyQ0 t8JZsv1cb6w4rTl8xoAvVlxcH5HNI083gNmycWBEowVq4NHEdVBTtv7suhS3 nLSwkhpxF1hZydUxcuKtyyXB5Dl4o.cMYWzHR2KQ3bfkaqLSx.xTAXZ7n026 z7dafqCPHZh2n.Vo3pbpsS2LfjXfOATe_VowmgF4_h9EJmciCtqvCEuT4YtN WJHuiUdSyLjgFf8KlNlYdhKF4Ry6BE2lRfnrPtoQCV7NhWo6l5triIx01Fmh p_m5fY_p3ig83i7txW18.KA.TCa72G615.54ndAHzlAcQLh0JH5ZilCTeJeB _dNAsPTNOPfJG6Wo- Received: from [96.47.226.21] by web141102.mail.bf1.yahoo.com via HTTP; Tue, 27 Nov 2012 04:41:44 PST X-Rocket-MIMEInfo: 001.001, PiBJdCdzIG5vdCBhIGJ1ZywgaXQncyBhIGZlYXR1cmUgb2YKPiBldmFsLWV4cHJlc3Npb24tcHJpbnQtZm9ybWF0LgpTb3JyeSBmb3IgdGhlIG1pc3Rha2VuIGJ1ZyByZXBvcnQuIEkgc2hvdWxkIGhhdmUgcmVhZCB0aGUgc291cmNlIGNvZGUsIGFuZCByZXBvcnRlZCB0aGlzIGJ1ZyBhcyBhIGRvY3VtZW50YXRpb24gZGVmaWNpZW5jeSBpbnN0ZWFkLCBzaW5jZSB0aGUgaGVscCBwYWdlcyBmb3IgZXZhbC1sYXN0LXNleHAgYW5kIGV2YWwtcHJpbnQtbGFzdC1zZXhwIHNheSBub3RoaW5nIGFib3V0IGV2YWwtZXgBMAEBAQE- X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.127.475 Message-ID: <1354020104.37554.YahooMailClassic@web141102.mail.bf1.yahoo.com> Date: Tue, 27 Nov 2012 04:41:44 -0800 (PST) From: Kelly Dean In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: 0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.4 (/) > It's not a bug, it's a feature of > eval-expression-print-format. Sorry for the mistaken bug report. I should have read the source code, and reported this bug as a documentation deficiency instead, since the help pages for eval-last-sexp and eval-print-last-sexp say nothing about eval-expression-print-format or about behaving differently when called twice. I propose adding to the doc strings for eval-last-sexp and eval-print-last-sexp, "If the value is an integer, and this command is called twice in succession, then in addition to printing the decimal representation, also print the octal and hex representations and char interpretation of the value." BTW the doc string for eval-last-sexp says "print value in minibuffer." which should be "print value into echo area." Also, eval-expression-print-format omits the char if the invoking command name is not eval-last-sexp or eval-print-last-sexp. Why? For example, if I do M-x eval-expression [ret] 5 [ret] I only get 5 (#o5, #x5) I don't see why not simplify it to: (defun eval-expression-print-format (value) "Format VALUE as a result of evaluated expression if invoked twice, invoked as a name other than eval-last-sexp or eval-print-last-sexp, or if in debug mode. Return a formatted string that is displayed in the echo area in addition to the value printed by prin1 in functions which display the result of expression evaluation." (if (and (integerp value) (or (not (memq this-command '(eval-last-sexp eval-print-last-sexp))) (eq this-command last-command) (if (boundp 'edebug-active) edebug-active))) (let ((char-string (prin1-char value))) (if char-string (format " (#o%o, #x%x, %s)" value value char-string) (format " (#o%o, #x%x)" value value))))) Even then the design seems wrong. It's designed to avoid producing the string the first time eval-last-sexp or eval-print-last-sexp is called, regardless of whether the result will be displayed in the echo area (in which case I don't see any reason to avoid it) or printed into the buffer (in which case avoiding it is good since the user probably wants just the decimal representation). And it makes one of my custom functions fail to work the same as eval-last-sexp when intended, which is what brought all this to my attention in the first place: (defun eval-region-or-last-sexp () "Eval region if active; otherwise, eval last sexp and print value into echo area or, with prefix argument, into current buffer. See `eval-region' and `eval-last-sexp' for details." (interactive) (if mark-active (call-interactively 'eval-region) (call-interactively 'eval-last-sexp))) I can fix my function using (setq this-command 'eval-last-sexp), but that's a kludge. It seems a better design would be to always include the string, even the first time, when displaying in the echo area, and never include the string when printing into the buffer, regardless of the invoking command name. This is simpler, and it's how eval-expression already works. Regarding lack of hard word wrap in the doc strings above, it's because I propose (add-hook 'help-mode-hook (lambda () (toggle-word-wrap 1))) From unknown Tue Jun 17 01:32:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12985: eval-last-sexp looks broken when executed twice Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2013 20:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Kelly Dean Cc: 12985@debbugs.gnu.org Received: via spool by 12985-submit@debbugs.gnu.org id=B12985.136787059230266 (code B ref 12985); Mon, 06 May 2013 20:04:01 +0000 Received: (at 12985) by debbugs.gnu.org; 6 May 2013 20:03:12 +0000 Received: from localhost ([127.0.0.1]:60194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZRct-0007s7-SZ for submit@debbugs.gnu.org; Mon, 06 May 2013 16:03:12 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:57040 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UZRcr-0007rx-0v for 12985@debbugs.gnu.org; Mon, 06 May 2013 16:03:10 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 89E13258B9E91C; Mon, 6 May 2013 13:02:08 -0700 (PDT) From: Juri Linkov Organization: JURTA References: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> <1354020104.37554.YahooMailClassic@web141102.mail.bf1.yahoo.com> Date: Mon, 06 May 2013 22:57:38 +0300 In-Reply-To: <1354020104.37554.YahooMailClassic@web141102.mail.bf1.yahoo.com> (Kelly Dean's message of "Tue, 27 Nov 2012 04:41:44 -0800 (PST)") Message-ID: <87ehdjlw3x.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Even then the design seems wrong. It's designed to avoid producing the > string the first time eval-last-sexp or eval-print-last-sexp is > called, regardless of whether the result will be displayed in the echo > area (in which case I don't see any reason to avoid it) or printed > into the buffer (in which case avoiding it is good since the user > probably wants just the decimal representation). > > It seems a better design would be to always include the string, even > the first time, when displaying in the echo area, and never include > the string when printing into the buffer, regardless of the invoking > command name. This is simpler, and it's how eval-expression already works. Thank you for suggesting a new design. I agree it is better than the current design. The patch below implements it and removes the feature of behaving differently when called twice. > And it makes one of my custom functions fail to work the same as > eval-last-sexp when intended, which is what brought all this to my > attention in the first place: > > (defun eval-region-or-last-sexp () > (interactive) > (if mark-active > (call-interactively 'eval-region) > (call-interactively 'eval-last-sexp))) > > I can fix my function using (setq this-command 'eval-last-sexp), but > that's a kludge. The function `eval-expression-print-format' in this patch doesn't compare the command name with `this-command' anymore, so your function `eval-region-or-last-sexp' above should work now as intended. Additionally, it allows a new prefix arg `M-0' to be used as `M-0 C-x C-e' to print more information with the octal and hex representations into the current buffer. It replaces the old feature of calling 'C-x C-e' twice to do the same. The documentation could be updated accordingly later. === modified file 'lisp/simple.el' --- lisp/simple.el 2013-04-18 13:15:08 +0000 +++ lisp/simple.el 2013-05-06 19:57:05 +0000 @@ -1280,12 +1280,10 @@ (defun eval-expression-print-format (val in addition to the value printed by prin1 in functions which display the result of expression evaluation." (if (and (integerp value) - (or (not (memq this-command '(eval-last-sexp eval-print-last-sexp))) - (eq this-command last-command) - (if (boundp 'edebug-active) edebug-active))) + (or (eq standard-output t) + (zerop (prefix-numeric-value current-prefix-arg)))) (let ((char-string - (if (or (if (boundp 'edebug-active) edebug-active) - (memq this-command '(eval-last-sexp eval-print-last-sexp))) + (if (char-displayable-p value) (prin1-char value)))) (if char-string (format " (#o%o, #x%x, %s)" value value char-string) From unknown Tue Jun 17 01:32:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12985: eval-last-sexp looks broken when executed twice Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 May 2013 21:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Kelly Dean Cc: 12985@debbugs.gnu.org Received: via spool by 12985-submit@debbugs.gnu.org id=B12985.136804849216823 (code B ref 12985); Wed, 08 May 2013 21:29:02 +0000 Received: (at 12985) by debbugs.gnu.org; 8 May 2013 21:28:12 +0000 Received: from localhost ([127.0.0.1]:34181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UaBuG-0004NG-4X for submit@debbugs.gnu.org; Wed, 08 May 2013 17:28:12 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:53176 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UaBuE-0004NA-GO for 12985@debbugs.gnu.org; Wed, 08 May 2013 17:28:11 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 7E937258B9E91C; Wed, 8 May 2013 14:28:08 -0700 (PDT) From: Juri Linkov Organization: JURTA References: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> <1354020104.37554.YahooMailClassic@web141102.mail.bf1.yahoo.com> <87ehdjlw3x.fsf@mail.jurta.org> Date: Thu, 09 May 2013 00:19:09 +0300 In-Reply-To: <87ehdjlw3x.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 06 May 2013 22:57:38 +0300") Message-ID: <874nedmaok.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> It seems a better design would be to always include the string, even >> the first time, when displaying in the echo area, and never include >> the string when printing into the buffer, regardless of the invoking >> command name. This is simpler, and it's how eval-expression already works. > > Thank you for suggesting a new design. I agree it is better > than the current design. The patch below implements it and > removes the feature of behaving differently when called twice. Since this feature will use a better design now, more commands could benefit from this feature: `C-M-x' (`eval-defun' and `edebug-eval-defun') and `ielm-send-input'. === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2013-05-06 20:23:40 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2013-05-08 21:12:52 +0000 @@ -928,6 +928,8 @@ (defun eval-defun-2 () ;; will make eval-region return. (goto-char ,end) ',form)))))) + (let ((str (eval-expression-print-format (car values)))) + (if str (princ str))) ;; The result of evaluation has been put onto VALUES. So return it. (car values)) === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2013-04-08 02:21:59 +0000 +++ lisp/emacs-lisp/edebug.el 2013-05-08 21:17:06 +0000 @@ -528,7 +528,10 @@ (defun edebug-eval-defun (edebug-it) (put (nth 1 form) 'saved-face nil))))) (setq edebug-result (eval (eval-sexp-add-defvars form) lexical-binding)) (if (not edebugging) - (princ edebug-result) + (prog1 + (princ edebug-result) + (let ((str (eval-expression-print-format edebug-result))) + (if str (princ str)))) edebug-result))) === modified file 'lisp/ielm.el' --- lisp/ielm.el 2013-01-01 09:11:05 +0000 +++ lisp/ielm.el 2013-05-08 21:10:23 +0000 @@ -408,7 +408,8 @@ (defun ielm-eval-input (input-string) (condition-case nil ;; Self-referential objects cause loops in the printer, so ;; trap quits here. May as well do errors, too - (setq ielm-output (concat ielm-output (pp-to-string ielm-result))) + (setq ielm-output (concat ielm-output (pp-to-string ielm-result) + (eval-expression-print-format ielm-result))) (error (setq ielm-error-type "IELM Error") (setq ielm-result "Error during pretty-printing (bug in pp)")) (quit (setq ielm-error-type "IELM Error") From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 19 17:17:11 2013 Received: (at control) by debbugs.gnu.org; 19 Oct 2013 21:17:12 +0000 Received: from localhost ([127.0.0.1]:58286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXdtX-0008Gq-G5 for submit@debbugs.gnu.org; Sat, 19 Oct 2013 17:17:11 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:41251 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXdtW-0008Gj-0c for control@debbugs.gnu.org; Sat, 19 Oct 2013 17:17:10 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 02DD7258B9E936 for ; Sat, 19 Oct 2013 14:17:08 -0700 (PDT) From: Juri Linkov To: control@debbugs.gnu.org (GNU bug tracker automated control server) Subject: Re: Processed (with 1 errors): Re: bug#15655: Eval integer, see extraneous nonsense output Organization: JURTA References: <87vc0tc6hq.fsf@mail.jurta.org> Date: Sun, 20 Oct 2013 00:16:34 +0300 In-Reply-To: (GNU bug tracker automated control server's message of "Sat, 19 Oct 2013 17:13:03 -0400") Message-ID: <87ppr1c66l.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) forcemerge 12985 15655 thanks From unknown Tue Jun 17 01:32:39 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Kelly Dean Subject: bug#12985: closed (Re: bug#12985: eval-last-sexp looks broken when executed twice) Message-ID: References: <87sitp7dxb.fsf@mail.jurta.org> <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> X-Gnu-PR-Message: they-closed 12985 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Reply-To: 12985@debbugs.gnu.org Date: Thu, 19 Dec 2013 21:04:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1387487042-10791-1" This is a multi-part message in MIME format... ------------=_1387487042-10791-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12985: eval-last-sexp looks broken when executed twice 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 12985@debbugs.gnu.org. --=20 12985: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12985 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1387487042-10791-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12985-done) by debbugs.gnu.org; 19 Dec 2013 21:03:54 +0000 Received: from localhost ([127.0.0.1]:59047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtkl8-0002ng-Af for submit@debbugs.gnu.org; Thu, 19 Dec 2013 16:03:54 -0500 Received: from [69.163.184.122] (port=49710 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtkl6-0002nY-LD for 12985-done@debbugs.gnu.org; Thu, 19 Dec 2013 16:03:52 -0500 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 2AF6734CB016A9; Thu, 19 Dec 2013 13:03:50 -0800 (PST) From: Juri Linkov To: Kelly Dean Subject: Re: bug#12985: eval-last-sexp looks broken when executed twice Organization: JURTA References: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> <1354020104.37554.YahooMailClassic@web141102.mail.bf1.yahoo.com> Date: Thu, 19 Dec 2013 23:03:36 +0200 In-Reply-To: <1354020104.37554.YahooMailClassic@web141102.mail.bf1.yahoo.com> (Kelly Dean's message of "Tue, 27 Nov 2012 04:41:44 -0800 (PST)") Message-ID: <87sitp7dxb.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > It seems a better design would be to always include the string, even > the first time, when displaying in the echo area, and never include > the string when printing into the buffer, regardless of the invoking > command name. This is simpler, and it's how eval-expression > already works. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 12985-done Cc: 12985-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > It seems a better design would be to always include the string, even > the first time, when displaying in the echo area, and never include > the string when printing into the buffer, regardless of the invoking > command name. This is simpler, and it's how eval-expression > already works. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS > It seems a better design would be to always include the string, even > the first time, when displaying in the echo area, and never include > the string when printing into the buffer, regardless of the invoking > command name. This is simpler, and it's how eval-expression > already works. This is implemented now, including other discussed changes. ------------=_1387487042-10791-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Nov 2012 01:53:52 +0000 Received: from localhost ([127.0.0.1]:37167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TcRPr-0005Pq-Q9 for submit@debbugs.gnu.org; Sat, 24 Nov 2012 20:53:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54867) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TcRPp-0005Pj-7m for submit@debbugs.gnu.org; Sat, 24 Nov 2012 20:53:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TcROH-0001gk-P3 for submit@debbugs.gnu.org; Sat, 24 Nov 2012 20:52:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:35127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcROH-0001gg-MI for submit@debbugs.gnu.org; Sat, 24 Nov 2012 20:52:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcROG-0005uV-UQ for bug-gnu-emacs@gnu.org; Sat, 24 Nov 2012 20:52:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TcROF-0001gU-SB for bug-gnu-emacs@gnu.org; Sat, 24 Nov 2012 20:52:12 -0500 Received: from nm26-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.74]:30124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcROF-0001gD-Mj for bug-gnu-emacs@gnu.org; Sat, 24 Nov 2012 20:52:11 -0500 Received: from [98.139.212.147] by nm26.bullet.mail.bf1.yahoo.com with NNFMP; 25 Nov 2012 01:52:06 -0000 Received: from [98.139.215.252] by tm4.bullet.mail.bf1.yahoo.com with NNFMP; 25 Nov 2012 01:52:06 -0000 Received: from [127.0.0.1] by omp1065.mail.bf1.yahoo.com with NNFMP; 25 Nov 2012 01:52:06 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 476489.15231.bm@omp1065.mail.bf1.yahoo.com Received: (qmail 43332 invoked by uid 60001); 25 Nov 2012 01:52:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1353808326; bh=dgmK1FZ37YEwRg4gSq6PPEhsRXz+C/P+7xlmjsQxBZI=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=ap87JwwrAVvGzLFg7q5a1TM3MFxbIgP9B2kVw4QMsA6fCotHOzSGsGLmcIzZ+N4Rss26gOOmQTVL+GI6aq+wxgFPmaJ1+NCm95Fm1ebsoGua3EVtf/EjuhgQV99ExtjEa/ygPRnEUTZCnFLrBS1ZRCBfqq5O0IAsp5jHvDzErW4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=YaXw48EDsGSX1mdYL/Phe2hGUuX2O84Y0b043tQcu/yg6le/stWg91JJv9EbNW+KRZydsJRCh30WDDD4Aznzfq+yxCS/y2dCuD2W7OJJNAyyqGkylpKBjCFK4oHVgFux/YNWQ2G6jT3mUBu9/+7tR7rFIEudvodR2XHKsdwSI8k=; X-YMail-OSG: RxLKtSIVM1nzKtKsWAEg3c3w7ZE9ciOiPwsYwlvsBZfq3xl 2uFPVHMFuLP3DitJd.OJrQ0cyJq75qsPVef9rN0KccF4lJyKFuqJ3_AwbYmL LMOPr2CxbjmQiU5FRwO_gZS4C9j4wTmSpeUBt9y1fsBR_.BVCZ8DbmoG6r4G IijQYfwDozvSAgctzzTFbVQJrAmBALONtOCJ3nVwaxWUiMWRKjkLNlszJwzJ PUDRM3sROLrZB0UhSoQrYpkoT_eltyfGWEF3q7Mvy3a30e4suqHdZ22_8L5F h31hlNBye55Q374Kwcn_hq4BhkL38Yl.zjLmzdHOVn8B7acNNJBtsuvLvCLu TTPPucDUIPDrHlRyzFWkwDk_e8llQou2ryEIZ18fhJnIp576Ea3.N1ZpOcMA cIZdzz8sxrnNc_nOqhVnTIVsOl5jHLlUkgHObjVMDgA-- Received: from [37.130.227.133] by web141103.mail.bf1.yahoo.com via HTTP; Sat, 24 Nov 2012 17:52:06 PST X-Rocket-MIMEInfo: 001.001, VXNpbmcgMjQuMiwgdHlwZToKNQpUaGVuIGRvIEMteCBDLWUsIGFuZCBhcyBleHBlY3RlZCBpdCBlY2hvZXM6CjUKQnV0IHRoZW4gZG8gQy14IEMtZSBhZ2FpbiwgYW5kIHVuZXhwZWN0ZWRseSBpdCBlY2hvZXM6CjUgKCNvNSwgI3g1LCA_XEMtZSkKVGhlIHNhbWUgdGhpbmcgaGFwcGVucyBpZiB5b3UgdHlwZSA1IHRoZW4gZG8gQy11IEMteCBDLWUgQy11IEMteCBDLWU7IGZpcnN0IGFzIGV4cGVjdGVkIHlvdSBnZXQ6CjU1ClRoZW4gdW5leHBlY3RlZGx5IHlvdSBnZXQ6CjU1NTUgKCNvNjcsICN4MzcsID83KQoBMAEBAQE- X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.123.460 Message-ID: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> Date: Sat, 24 Nov 2012 17:52:06 -0800 (PST) From: Kelly Dean Subject: eval-last-sexp looks broken when executed twice To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Using 24.2, type: 5 Then do C-x C-e, and as expected it echoes: 5 But then do C-x C-e again, and unexpectedly it echoes: 5 (#o5, #x5, ?\C-e) The same thing happens if you type 5 then do C-u C-x C-e C-u C-x C-e; first as expected you get: 55 Then unexpectedly you get: 5555 (#o67, #x37, ?7) ------------=_1387487042-10791-1-- From unknown Tue Jun 17 01:32:39 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Barry OReilly Subject: bug#15655: closed (Re: bug#12985: eval-last-sexp looks broken when executed twice) Message-ID: References: <87sitp7dxb.fsf@mail.jurta.org> X-Gnu-PR-Message: they-closed 15655 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Reply-To: 15655@debbugs.gnu.org Date: Thu, 19 Dec 2013 21:04:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1387487043-10791-3" This is a multi-part message in MIME format... ------------=_1387487043-10791-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12985: Eval integer, see extraneous nonsense output 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 15655@debbugs.gnu.org. --=20 12985: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12985 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1387487043-10791-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12985-done) by debbugs.gnu.org; 19 Dec 2013 21:03:54 +0000 Received: from localhost ([127.0.0.1]:59047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtkl8-0002ng-Af for submit@debbugs.gnu.org; Thu, 19 Dec 2013 16:03:54 -0500 Received: from [69.163.184.122] (port=49710 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtkl6-0002nY-LD for 12985-done@debbugs.gnu.org; Thu, 19 Dec 2013 16:03:52 -0500 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 2AF6734CB016A9; Thu, 19 Dec 2013 13:03:50 -0800 (PST) From: Juri Linkov To: Kelly Dean Subject: Re: bug#12985: eval-last-sexp looks broken when executed twice Organization: JURTA References: <1353808326.42897.YahooMailClassic@web141103.mail.bf1.yahoo.com> <1354020104.37554.YahooMailClassic@web141102.mail.bf1.yahoo.com> Date: Thu, 19 Dec 2013 23:03:36 +0200 In-Reply-To: <1354020104.37554.YahooMailClassic@web141102.mail.bf1.yahoo.com> (Kelly Dean's message of "Tue, 27 Nov 2012 04:41:44 -0800 (PST)") Message-ID: <87sitp7dxb.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > It seems a better design would be to always include the string, even > the first time, when displaying in the echo area, and never include > the string when printing into the buffer, regardless of the invoking > command name. This is simpler, and it's how eval-expression > already works. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 12985-done Cc: 12985-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > It seems a better design would be to always include the string, even > the first time, when displaying in the echo area, and never include > the string when printing into the buffer, regardless of the invoking > command name. This is simpler, and it's how eval-expression > already works. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS > It seems a better design would be to always include the string, even > the first time, when displaying in the echo area, and never include > the string when printing into the buffer, regardless of the invoking > command name. This is simpler, and it's how eval-expression > already works. This is implemented now, including other discussed changes. ------------=_1387487043-10791-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Oct 2013 20:20:26 +0000 Received: from localhost ([127.0.0.1]:58233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXd0b-0005hw-E3 for submit@debbugs.gnu.org; Sat, 19 Oct 2013 16:20:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46796) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXd0Z-0005hf-7J for submit@debbugs.gnu.org; Sat, 19 Oct 2013 16:20:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXd0T-0003OD-6n for submit@debbugs.gnu.org; Sat, 19 Oct 2013 16:20:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXd0T-0003O9-3e for submit@debbugs.gnu.org; Sat, 19 Oct 2013 16:20:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXd0S-0005dw-7c for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 16:20:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXd0R-0003Nv-F8 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 16:20:16 -0400 Received: from mail-oa0-x236.google.com ([2607:f8b0:4003:c02::236]:37427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXd0R-0003Nr-9e for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 16:20:15 -0400 Received: by mail-oa0-f54.google.com with SMTP id o20so1221858oag.41 for ; Sat, 19 Oct 2013 13:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=+WrFMVDAvAzUZS7BxLnF8izgNiq4+LF9Oex5dbqrEbQ=; b=SgXS9oq1itDEttKRdz/lwroW1bnXu0Kn4kn8oPEMEvg/nrrdwWg5qjO2m8mt63Imqq a+ZJOBU10zhHejR5LuQsKPBFTkQuHDCdD0QY25mzTdUoTZVktaEb3C2ER0KJIUt86dIf rKHLUEvwYSSABax2wjOQh7QckE/m+x4FfcWsgOL8GnU1UwRrp5imYZnaSRLRPGW/Eg3K czWctyoNPnjPW/B5Btf3cV6RB+i3YW2McWyg5G/pOT+d6IFmH8xuWQteGTik7DjeHsFP JVqbY+uuPjqvRfMIjZJN982kUXt2uNWvT7fONLAq9S+okenpZFw5CHH1qb15wfYMXRge s1XA== MIME-Version: 1.0 X-Received: by 10.182.250.163 with SMTP id zd3mr13567335obc.20.1382214014417; Sat, 19 Oct 2013 13:20:14 -0700 (PDT) Received: by 10.76.156.103 with HTTP; Sat, 19 Oct 2013 13:20:14 -0700 (PDT) Date: Sat, 19 Oct 2013 16:20:14 -0400 Message-ID: Subject: Eval integer, see extraneous nonsense output From: Barry OReilly To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=089e01634ec2553eeb04e91dc7cb X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) --089e01634ec2553eeb04e91dc7cb Content-Type: text/plain; charset=ISO-8859-1 Run emacs -Q. Type the number 23 in the scratch buffer. eval-last-sexp and see in the minibuffer: "23". eval-last-sexp again and see in the minibuffer: "23 (#o27, #x17, ?\C-w)". I didn't expect (#o27, #x17, ?\C-w). Using recent trunk. --089e01634ec2553eeb04e91dc7cb Content-Type: text/html; charset=ISO-8859-1
Run emacs -Q. Type the number 23 in the scratch buffer. eval-last-sexp
and see in the minibuffer: "23". eval-last-sexp again and see in the
minibuffer: "23 (#o27, #x17, ?\C-w)". I didn't expect (#o27, #x17,
?\C-w).

Using recent trunk.

--089e01634ec2553eeb04e91dc7cb-- ------------=_1387487043-10791-3--