* bug#6659: 24.0.50; doc string of `format'
@ 2010-07-16 21:48 Drew Adams
2011-07-03 13:03 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2010-07-16 21:48 UTC (permalink / raw)
To: 6659
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'
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#6659: 24.0.50; doc string of `format'
2010-07-16 21:48 bug#6659: 24.0.50; doc string of `format' Drew Adams
@ 2011-07-03 13:03 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-03 13:03 UTC (permalink / raw)
To: Drew Adams; +Cc: 6659
"Drew Adams" <drew.adams@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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-03 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 21:48 bug#6659: 24.0.50; doc string of `format' Drew Adams
2011-07-03 13:03 ` Lars Magne Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.