GNU bug report logs -
#24314
Mistake in GNU Emacs Lisp Reference Manual
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24314 in the body.
You can then email your comments to 24314 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24314
; Package
emacs
.
(Fri, 26 Aug 2016 18:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eric Wayman <ericwayman <at> fastmail.fm>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 26 Aug 2016 18:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
To Whom It May Concern,
I believe I have found a mistake in the GNU Emacs Lisp Reference
Manual.
In section 4.7, Formatting Strings
(https://www.gnu.org/software/emacs/manual/html_node/elisp/Formatting-Strings.html#Formatting-Strings)
it says:
"The precision is a decimal-point ‘.’ followed by a digit-string...
Precision has no effect for other specification characters."
However, running
(format "%.10d" 23)
produces
0000000023
which clearly does have an effect (i.e. padding the integer with zeroes
to the left).
Best regards,
Eric Wayman
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 26 Aug 2016 19:15:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Eric Wayman <ericwayman <at> fastmail.fm>
:
bug acknowledged by developer.
(Fri, 26 Aug 2016 19:15:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 24314-done <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 26 Aug 2016 14:07:19 -0400
> From: Eric Wayman <ericwayman <at> fastmail.fm>
>
> In section 4.7, Formatting Strings
> (https://www.gnu.org/software/emacs/manual/html_node/elisp/Formatting-Strings.html#Formatting-Strings)
> it says:
>
> "The precision is a decimal-point ‘.’ followed by a digit-string...
> Precision has no effect for other specification characters."
>
> However, running
>
> (format "%.10d" 23)
>
> produces
>
> 0000000023
>
> which clearly does have an effect (i.e. padding the integer with zeroes
> to the left).
Thanks. This is already fixed in the development sources of what
will become Emacs 25.1. The manual now says:
All the specification characters allow an optional “precision” before
the character (after the width, if present). The precision is a
decimal-point ‘.’ followed by a digit-string. For the floating-point
specifications (‘%e’, ‘%f’, ‘%g’), the precision specifies how many
decimal places to show; if zero, the decimal-point itself is also
omitted. For ‘%s’ and ‘%S’, the precision truncates the string to the
given width, so ‘%.3s’ shows only the first three characters of the
representation for OBJECT. For other specification characters, the
effect of precision is what the local library functions of the ‘printf’
family produce.
(I clarified the last sentence just now.)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 24 Sep 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.