From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#25557: Documentation of format doesn't describe "g" accurately Date: Sat, 28 Jan 2017 10:04:33 -0500 Message-ID: References: <78ace0d5-59f1-0d7d-1f0e-b589a947d76c@live.com> <83poj7zika.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dmWVXJXCW1GogmoiSSNOkAHsC75UwgrRf" X-Trace: blaine.gmane.org 1485615919 2497 195.159.176.226 (28 Jan 2017 15:05:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 28 Jan 2017 15:05:19 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 Cc: 25557-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 28 16:05:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXUYu-0008AE-Ui for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jan 2017 16:05:09 +0100 Original-Received: from localhost ([::1]:52199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXUZ0-0005mQ-Bg for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jan 2017 10:05:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXUYr-0005ki-U7 for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 10:05:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXUYo-0003nk-Qa for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 10:05:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51084) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cXUYo-0003ng-O3 for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 10:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cXUYo-0001Zy-7U for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 10:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Jan 2017 15:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25557 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25557-done@debbugs.gnu.org id=D25557.14856158906050 (code D ref 25557); Sat, 28 Jan 2017 15:05:02 +0000 Original-Received: (at 25557-done) by debbugs.gnu.org; 28 Jan 2017 15:04:50 +0000 Original-Received: from localhost ([127.0.0.1]:49283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXUYc-0001ZV-8s for submit@debbugs.gnu.org; Sat, 28 Jan 2017 10:04:50 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.10]:50418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXUYa-0001ZH-7L for 25557-done@debbugs.gnu.org; Sat, 28 Jan 2017 10:04:49 -0500 Original-Received: from [18.111.113.197] ([18.111.113.197]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.184]) with ESMTPSA (Nemesis) id 0Lch0h-1c6eGU0U4t-00k3yl; Sat, 28 J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WA= 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:128718 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dmWVXJXCW1GogmoiSSNOkAHsC75UwgrRf Content-Type: multipart/mixed; boundary="MiAbvb8Apk9FwiEAXo1iw0gSMGOECmdna"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Eli Zaretskii Cc: 25557-done@debbugs.gnu.org Message-ID: Subject: Re: bug#25557: Documentation of format doesn't describe "g" accurately References: <78ace0d5-59f1-0d7d-1f0e-b589a947d76c@live.com> <83poj7zika.fsf@gnu.org> In-Reply-To: <83poj7zika.fsf@gnu.org> --MiAbvb8Apk9FwiEAXo1iw0gSMGOECmdna Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-01-28 03:37, Eli Zaretskii wrote: >> =E2=80=A6 > Fixed. >> =E2=80=A6 > > I don't understand what you are trying to say (nor the significance of > the '.' flag in the example). '#' forces %g to leave the trailing > zeros after the decimal, so I added that -- is that what you wanted to > say? > >> =E2=80=A6 > Fixed. > >> Similar problems seem to exist in the actual documentation. > If you mean the ELisp manual, I fixed that as well. Thanks a lot! My comment about '#' was that the description of '#' sugges= ted that it would only change things when the precision is 0 (which wasn'= t true). >> On a related note, is there a way to get a shortest representation of = a number? Something like %g, but without exponents. >=20 > Sorry, I don't understand the question. How can you represent an > arbitrary number without exponents at all, except by %f? I'd like something like this (with a hypothetical %q): (format "%.3q" 3) =E2=87=92 "3" (format "%.3q" 3.00) =E2=87=92 "3" (format "%.3q" 3.30) =E2=87=92 "3.3" (format "%.3q" 3.05) =E2=87=92 "3.05" (format "%.3q" 3.352) =E2=87=92 "3.35" (format "%.3q" 3100000) =E2=87=92 "3100000" This is in fact just the same as 'g', except for the last entry (%g produ= ces "3.1e+06"). Is this achievable? Thanks! Cl=C3=A9ment. --MiAbvb8Apk9FwiEAXo1iw0gSMGOECmdna-- --dmWVXJXCW1GogmoiSSNOkAHsC75UwgrRf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYjLMBAAoJEPqg+cTm90wj4ioP+gOcCvr/1TFSLdetpX95bSkt eEmDi/Sk73JjL0pa/P5iepx0p0btwvlZOftD/VIzW9USVI1TB75pXw/o+HCIkPPy zeTrhGkfJP/AbsbRgBFO7rsiwloN232YpOnaFOMR2ZRKmyCMwjVk/vhbLgE1i2Lt 5suZ6oBScPyGEKyUi2Z1NU28uXjqJARrPbddh2NulbcoPorMI2Oljn72nartc/nS F4YqQV0sSE9VN0AjIxaRUHX1SRNM1OjcJvSBHWqYVOqeImHBWgVKlEdWybXJA0rg Exf4bdE9A5ROp8H2/0aCOwWYpqMC4JKejC4w5VHtFYbwnsfGWr3iSzltKB4sCot4 GuSAlqzfZtSkCHoB6Ktt8ro7/E3jHTtE21pQPCiParm+nbpfvjwxivRREBQcw84r qZT3kK2KgxSP6t7Qm4pD80A07wKlYwLcA0U7eEKsg52jw9cn5gldv/jsvhQ5biPL /WMGAui5u7teGczT0SJsCo58tYMlyPwSVCo7f1TxK0HIS1k2fjBC0E1P6zC2NyjS TTdm+kdIONkgXlcL4I8m1GdeF118rSkP/g40DNVT1zDj1HpdfWb8CsJC76MDItCH GBmj99Sq4JYsJyv09k3UbfYoMH2+59/9vArMUUb0OD/Xm/AGMpkNK4uqYcUpKTdU hT4IPSHGtvbFrUTUM7SI =8e5L -----END PGP SIGNATURE----- --dmWVXJXCW1GogmoiSSNOkAHsC75UwgrRf--