From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19114: 25.0.50; doc string of `eval-expression-print-format' is inappropriate Date: Sat, 30 Apr 2016 18:43:16 +0300 Message-ID: <83zisbnluz.fsf@gnu.org> References: <87pot7nn86.fsf@gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1462031080 29728 80.91.229.3 (30 Apr 2016 15:44:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Apr 2016 15:44:40 +0000 (UTC) Cc: 19114@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 30 17:44:29 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1awX4H-0007YP-9P for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Apr 2016 17:44:29 +0200 Original-Received: from localhost ([::1]:58825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awX4D-0005E0-Fb for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Apr 2016 11:44:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awX44-0004zv-SI for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 11:44:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awX3t-00023N-1t for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 11:44:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awX3s-00022k-Ug for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 11:44:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1awX3p-0005kW-Io for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 11:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Apr 2016 15:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19114 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 19114-submit@debbugs.gnu.org id=B19114.146203102622068 (code B ref 19114); Sat, 30 Apr 2016 15:44:01 +0000 Original-Received: (at 19114) by debbugs.gnu.org; 30 Apr 2016 15:43:46 +0000 Original-Received: from localhost ([127.0.0.1]:57986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awX3X-0005jn-85 for submit@debbugs.gnu.org; Sat, 30 Apr 2016 11:43:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awX3T-0005jY-5Q for 19114@debbugs.gnu.org; Sat, 30 Apr 2016 11:43:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awX3E-0001tz-Jc for 19114@debbugs.gnu.org; Sat, 30 Apr 2016 11:43:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awX3E-0001t3-Fj; Sat, 30 Apr 2016 11:43:24 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1809 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1awX38-0008Fz-AC; Sat, 30 Apr 2016 11:43:18 -0400 In-reply-to: <87pot7nn86.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 30 Apr 2016 17:13:45 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:117354 Archived-At: > From: Lars Ingebrigtsen > Date: Sat, 30 Apr 2016 17:13:45 +0200 > Cc: 19114@debbugs.gnu.org > > Drew Adams writes: > > > The doc string says "Return a formatted string which is displayed in the > > echo area..." This is quite misleading. It can easily give the > > impression that this function displays the returned value in the echo > > area. THIS function does not with the formatted string, besides > > returning it. It displays nothing. Please DTRT. > > (defun eval-expression-print-format (value) > "Format VALUE as a result of evaluated expression. > Return a formatted string which is displayed in the echo area > in addition to the value printed by prin1 in functions which > display the result of expression evaluation." > > I don't know quite what they're trying to express here... Much ado about nothing, if you ask me. Replace "is displayed" with "will be displayed", and I think the intent is more clear. > But then again, I don't understand the meaning of the function, either: > > (if (and (integerp value) > (or (eq standard-output t) > (zerop (prefix-numeric-value current-prefix-arg)))) > (let ((char-string > (if (and (characterp value) > (char-displayable-p value)) > (prin1-char value)))) > (if char-string > (format " (#o%o, #x%x, %s)" value value char-string) > (format " (#o%o, #x%x)" value value))))) > > (eval-expression-print-format 1) > C-x C-e > " (#o1, #x1, ?\\C-a)" appears in *Messages* > > (eval-expression-print-format 1) > C-u C-x C-e > => nil > Nothing in *Messages* Try "C-u 0", like the code says.