From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.bugs Subject: bug#20691: 24.5; `eval-expression' doesn't conform to its docstring Date: Fri, 29 May 2015 11:36:19 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013d15225b80df051735358d X-Trace: ger.gmane.org 1432892241 9895 80.91.229.3 (29 May 2015 09:37:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2015 09:37:21 +0000 (UTC) To: 20691@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 29 11:37:11 2015 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 1YyGiz-00067M-7o for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 May 2015 11:37:09 +0200 Original-Received: from localhost ([::1]:34643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGiy-0000fT-Iy for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 May 2015 05:37:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGiu-0000dF-Ck for bug-gnu-emacs@gnu.org; Fri, 29 May 2015 05:37:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyGit-000538-0z for bug-gnu-emacs@gnu.org; Fri, 29 May 2015 05:37:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGis-000532-V8 for bug-gnu-emacs@gnu.org; Fri, 29 May 2015 05:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YyGis-0004uY-OS for bug-gnu-emacs@gnu.org; Fri, 29 May 2015 05:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 May 2015 09:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143289219418837 (code B ref -1); Fri, 29 May 2015 09:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 May 2015 09:36:34 +0000 Original-Received: from localhost ([127.0.0.1]:60067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YyGiP-0004tk-Pj for submit@debbugs.gnu.org; Fri, 29 May 2015 05:36:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48423) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YyGiN-0004tX-V9 for submit@debbugs.gnu.org; Fri, 29 May 2015 05:36:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyGiH-0004Ub-51 for submit@debbugs.gnu.org; Fri, 29 May 2015 05:36:26 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGiH-0004UU-2r for submit@debbugs.gnu.org; Fri, 29 May 2015 05:36:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGiF-0008Cn-Ad for bug-gnu-emacs@gnu.org; Fri, 29 May 2015 05:36:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyGiD-0004Sq-BB for bug-gnu-emacs@gnu.org; Fri, 29 May 2015 05:36:23 -0400 Original-Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:36444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGiD-0004SY-0k for bug-gnu-emacs@gnu.org; Fri, 29 May 2015 05:36:21 -0400 Original-Received: by wgbgq6 with SMTP id gq6so57692147wgb.3 for ; Fri, 29 May 2015 02:36:19 -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=2WH0GF94RmG6ewwMZ0hMkJgmKu8Nap7FpVIW+fjoYDg=; b=a42nwd45Osb46Q0v6tZKgT/onfsvJbVQAZjYpg1OMYCJT8aTrH+89wNEpsjIatYCkX P3ZmUVXhMakcFzwKmtkV4IbVZySk/RSSi4lwllMx/HBqaV6EphO4ubK2NUj8fneNZBf+ gv4ZrBHsqj+wrAWlCxlX0Pr3IIpSF6Dv9YEYFv0RXhLAOGcTbhgqQUE6mb3TixHMMd7i Lb2XkFt0nDeOxUWoYGdyArzUeqVreSDiVY95wZK1LYE3hN3E6ppms0RQBuD4nKSQ7Gl/ 9qZT8VVDl52RGQx+vk+GeZ007rnFkWFgA+caMLY5aIo7Os7Qz6j+e314Sx7mn0nPiL8T gILQ== X-Received: by 10.194.178.201 with SMTP id da9mr4654674wjc.139.1432892179446; Fri, 29 May 2015 02:36:19 -0700 (PDT) Original-Received: by 10.28.225.66 with HTTP; Fri, 29 May 2015 02:36:19 -0700 (PDT) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103299 Archived-At: --089e013d15225b80df051735358d Content-Type: text/plain; charset=UTF-8 Evaluating numbers and characters with M-: prints their value and additionally to that the octal, hexadecimal and character representation of the number if it's printable. I've checked its docstring and was surprised to read that the aforementioned behaviour should only happen when using a prefix argument of zero. This either means that the docstring should be updated to make clear that this behaviour also happens when using without any kind of prefix argument or the function should be changed to not display this information when used without any prefix argument. The same question applies to other functions making use of the internal `eval-expression-print-format' function that is responsible for returning the alternate representation of the number, such as `eval-defun-2' and `eval-last-sexp-print-value' in lisp-mode.el and a few more. In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2) of 2015-04-20 on bitzer.hoetzel.info Windowing system distributor `The X.Org Foundation', version 11.0.11701000 System Description: Arch Linux Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 70969 6814) (symbols 48 17559 0) (miscs 40 35 138) (strings 32 9041 4444) (string-bytes 1 248306) (vectors 16 8908) (vector-slots 8 383094 18351) (floats 8 63 183) (intervals 56 177 0) (buffers 960 11) (heap 1024 35456 945)) --089e013d15225b80df051735358d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Evaluating numbers and characters with M-: prints thei= r value and
additionally to that the octal, hexadecimal and character re= presentation
of the number if it's printable.=C2=A0 I've checked= its docstring and was
surprised to read that the aforementioned behavio= ur should only happen
when using a prefix argument of zero.=C2=A0 This e= ither means that the
docstring should be updated to make clear that this= behaviour also
happens when using without any kind of prefix argument o= r the function
should be changed to not display this information when us= ed without any
prefix argument.

The same question applies to othe= r functions making use of the internal
`eval-expression-print-format'= ; function that is responsible for
returning the alternate representatio= n of the number, such as
`eval-defun-2' and `eval-last-sexp-print-va= lue' in lisp-mode.el and a
few more.



In GNU Emacs 24.= 5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
=C2=A0of 2015-04-20 = on bitzer.hoetzel.info
Window= ing system distributor `The X.Org Foundation', version 11.0.11701000System Description: Arch Linux

Configured using:
=C2=A0`configur= e --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib
=C2=A0--lo= calstatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft
=C2=A0'CFLAGS= =3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protector-strong
= =C2=A0--param=3Dssp-buffer-size=3D4' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2=C2=A0LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro'

Im= portant settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-co= ding-system: utf-8-unix

Major mode: Lisp Interaction

Minor mo= des in effect:
=C2=A0 tooltip-mode: t
=C2=A0 electric-indent-mode: t<= br>=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar= -mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode= : t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 au= to-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-com= pression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mod= e: t

Recent messages:
For information about GNU Emacs and the GNU= system, type C-h C-a.

Load-path shadows:
None found.

Feat= ures:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc8= 22 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231=
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
= mm-util help-fns mail-prsvr mail-utils time-date tooltip electric
uniqui= fy ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd f= ontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-= mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse ji= t-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lan= g misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew = greek romanian slovak czech european ethiopic indian
cyrillic chinese ca= se-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice lo= addefs button faces cus-face macroexp files
text-properties overlay sha1= md5 base64 format env code-pages mule
custom widget hashtable-print-rea= dable backquote make-network-process
dbusbind gfilenotify dynamic-settin= g system-font-setting
font-render-setting move-toolbar gtk x-toolkit x m= ulti-tty emacs)

Memory information:
((conses 16 70969 6814)
= =C2=A0(symbols 48 17559 0)
=C2=A0(miscs 40 35 138)
=C2=A0(strings 32 = 9041 4444)
=C2=A0(string-bytes 1 248306)
=C2=A0(vectors 16 8908)
= =C2=A0(vector-slots 8 383094 18351)
=C2=A0(floats 8 63 183)
=C2=A0(in= tervals 56 177 0)
=C2=A0(buffers 960 11)
=C2=A0(heap 1024 35456 945))=
--089e013d15225b80df051735358d--