[PATCH] hgrc5: wrap corrected text at 80 chars for manpage

Christian Ebert blacktrash at gmx.net
Mon Jun 8 05:44:33 CDT 2009


* Martin Geisler on Monday, June 08, 2009 at 10:52:51 +0200
> Christian Ebert <blacktrash at gmx.net> writes:
>> * Christian Ebert on Monday, June 08, 2009 at 00:36:18 +0200
>>> * Martin Geisler on Monday, June 08, 2009 at 00:18:45 +0200
>>>> Thanks, but I've just finished wrapping the text in all three manpages!
>>> 
>>> Have you checked? It's not as easy as you think ;-)
> 
> Oh -- I don't really know anything about asciidoc, so please explain
> what the problem is.

I don't know asciidoc either, I just look at man 5 hgrc in an 80
char wide terminal (which seems a reasonable default) ;-)

>>> Basically you've rolled back all the wrappings I've done for
>>> paragraphs with a very high indent.
>> 
>> That still holds true, though ;-)
> 
> I'm sorry, but I don't understand what the error is. I think I
> maintained the same indention as you did?

Nope. There is no error, but the indentation levels are hard to
detect in the source, at least for me.

> I wrapped all strings, including those paragraphs that were narrower
> than 70 characters, which Emacs uses as the default fill column. The
> paragraphs you wrapped are now wrapped slightly differently -- some
> because of timeless' language changes, some because I guess you used
> another tool and maybe a different fill column?

I do it the amateur way: I scroll through the manpage in an 80
char wide terminal, and where I get


                   If no suitable authentication entry is found, the user is pro
mpted
                   for credentials as usual if required by the remote.


I try to do something about it ;-) A little python wrapping tool
I made (for rewrapping broken mails) helps to wrap respecting
indentation.

> Does wrapping the narrow paragraphs affect how asciidoc will format
> the docbook/manpage? I don't have asciidoc available right now so I
> cannot test it myself.

It's all a matter of indentation levels. If someone has a way to
detect asciidoc indentation levels this could probably be
automated.

The cleanest way would be to reflect the exact indentation level
in the source. I'll have a look if this is possible. Takes time
though because I have to do it manually, basically rechecking
with each paragraph on what level it is.

Of course this gets worse with man 1 hg, because of gendoc.py;
there the command help has to be checked as well.

The very best thing would a switch in asciidoc that wraps
automatically at 80 chars respecting the indentation level -- I
haven't found it.

c
-- 
  Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
_F R E E_  _V I D E O S_  http://www.blacktrash.org/underdogma/
                          http://www.blacktrash.org/underdogma/index-en.html


More information about the Mercurial-devel mailing list