GNU bug report logs - #6659
24.0.50; doc string of `format'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 16 Jul 2010 21:50:03 UTC

Severity: minor

Tags: fixed

Found in version 24.0.50

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6659 in the body.
You can then email your comments to 6659 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6659; Package emacs. (Fri, 16 Jul 2010 21:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 16 Jul 2010 21:50:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; doc string of `format'
Date: Fri, 16 Jul 2010 14:48:51 -0700
The Elisp manual says this about the 0 and - flags for `format':
 
 "The flag `-' causes the padding inserted by the width specifier, if
 any, to be inserted on the right rather than the left.  The flag `0'
 ensures that the padding consists of `0' characters instead of spaces,
 inserted on the left.  These flags are ignored for specification
 characters for which they do not make sense: `%s', `%S' and `%c' accept
 the `0' flag, but still pad with _spaces_ on the left."
 
1. What does "for which they do not make sense" mean, exactly?  The text
goes on to say that `0' is never used for the non-numeric specs.  But it
says nothing about `-'.  When does `-' "not make sense"?
 
2. That information about `-' and `0' being ignored in some cases is
completely missing from the doc string for `format'.  The doc string in
fact contradicts this, saying that "The padding character is normally a
space, but it is 0 if the 0 flag is present."  That sentence is false
for anything except a number spec - it is never 0 for a number spec.
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-07-12 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include'
 





Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 03 Jul 2011 13:04:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 6659 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 03 Jul 2011 13:04:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6659; Package emacs. (Sun, 03 Jul 2011 13:10:03 GMT) Full text and rfc822 format available.

Message #12 received at 6659 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 6659 <at> debbugs.gnu.org
Subject: Re: 24.0.50; doc string of `format'
Date: Sun, 03 Jul 2011 15:03:29 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> The Elisp manual says this about the 0 and - flags for `format':
>
>  "The flag `-' causes the padding inserted by the width specifier, if
>  any, to be inserted on the right rather than the left.  The flag `0'
>  ensures that the padding consists of `0' characters instead of spaces,
>  inserted on the left.  These flags are ignored for specification
>  characters for which they do not make sense: `%s', `%S' and `%c' accept
>  the `0' flag, but still pad with _spaces_ on the left."
>
> 1. What does "for which they do not make sense" mean, exactly?  The text
> goes on to say that `0' is never used for the non-numeric specs.  But it
> says nothing about `-'.  When does `-' "not make sense"?
>
> 2. That information about `-' and `0' being ignored in some cases is
> completely missing from the doc string for `format'.  The doc string in
> fact contradicts this, saying that "The padding character is normally a
> space, but it is 0 if the 0 flag is present."  That sentence is false
> for anything except a number spec - it is never 0 for a number spec.

I've now clarified both the manual and the doc string.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 01 Aug 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 18 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.