bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No justification for --no-justification (man)


From: Colin Watson
Subject: Re: No justification for --no-justification (man)
Date: Sat, 4 Dec 2010 22:55:02 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Sat, Dec 04, 2010 at 12:09:22PM +0000, Reuben Thomas wrote:
> On 4 December 2010 11:07, Colin Watson <address@hidden> wrote:
> > On Fri, Dec 03, 2010 at 08:15:23PM +0000, Reuben Thomas wrote:
> >> Is the spacing of the --help for --no-justification a joke? It
> >> backfires rather on terminals narrower than your implied column width
> >> (80?).
> >
> > Not particularly; can you show me an example of what you mean?
> 
> I would expect these two lines:
> 
>       --no-hyphenation, --nh turn off hyphenation
>       --no-justification,                              --nj   turn off
> justification
> 
> to look like this:
> 
>       --no-hyphenation, --nh turn off hyphenation
>       --no-justification, --nj turn off justification
> 
> --nj is the only option documented in that way: you'll notice that the
> line on which it is documented is justified by inserting extra spaces
> not only after the long option, but between "--nj" and "turn off
> justification".

Oh yes, I see what you mean now.  I think this must be an argp bug.  The
struct argp_option entries just look like this:

        { "no-hyphenation",
                 OPT_NO_HYPHENATION,    0,              0,              
N_("turn off hyphenation") },
        { "nh",                 0,      0,              OPTION_ALIAS },
        { "no-justification",
               OPT_NO_JUSTIFICATION,    0,              0,              
N_("turn off justification") },
        { "nj",                 0,      0,              OPTION_ALIAS },

So I think argp-help's wrapping is buggy.  I could look into that, but
it's a couple of thousand lines of code I don't know at all right now -
perhaps somebody on bug-gnulib can help?

> That it may not be a joke is suggested by some similar oddness in the
> documentation of -p, where there is an apparently unintended line
> break just before "g - grap" (from the formatting of the rest of the
> test, one would expect it afterwards, and then for "r - refer" to be
> indented up to the same column as the preceding line, which starts "e
> - [n]eqn".

That's a different issue.  I deliberately inserted a \n there because I
didn't want to deal with line-wrapping in the middle of something that's
supposed to look like this:

  -p, --preprocessor=STRING  STRING indicates which preprocessors to run:
                             e - [n]eqn, p - pic, t - tbl,
                             g - grap, r - refer, v - vgrind

However, instead it comes out looking like this:

  -p, --preprocessor=STRING  STRING indicates which preprocessors to run:
                             e - [n]eqn, p - pic, t - tbl,
g - grap, r - refer, v - vgrind

Shouldn't argp put a sensible left margin after each newline?

Thanks,

-- 
Colin Watson                                       address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]