all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 6659@debbugs.gnu.org
Subject: bug#6659: 24.0.50; doc string of `format'
Date: Sun, 03 Jul 2011 15:03:29 +0200	[thread overview]
Message-ID: <m3d3hrplcu.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <8783F2C73E2C4F04A5A4B36F21CCFAFC@us.oracle.com> (Drew Adams's message of "Fri, 16 Jul 2010 14:48:51 -0700")

"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/





      reply	other threads:[~2011-07-03 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16 21:48 bug#6659: 24.0.50; doc string of `format' Drew Adams
2011-07-03 13:03 ` Lars Magne Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d3hrplcu.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    --cc=6659@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.