Default record version
simon at josefsson.org
Fri Feb 27 09:32:58 CET 2009
Martin von Gagern <Martin.vGagern at gmx.net> writes:
> Simon Josefsson schrieb:
>> This seems to break texinfo building:
> Probably because percent signs introduce a comment in texinfo, as they
> do in tex. The attached patch might fix that. Haven't tested it myself,
> as I only have remote access over a slow link to my build environment
> right now.
Hi Martin. Thanks. I have reverted the earlier patch to be able to
make a release, but we should definitely try to fix this. I'll try your
patch later too -- it helps to compare the output with an old release to
catch regressions here, so making a release first seemed better from
this point of view as well.
> I have to admit that things become even more hackish with this patch in
> place, as there are now even more places where the sequence "% receives
> special treatment. The main reason for this is that the replacements are
> stored in hashes, not lists, so I can't rely on the order of
> substitutions, therefore I can't first replace the constants and then
> replace all remaining percent signs.
> Maybe the replacement of % were better done somewhere in the
> corresponding output function, along with sepcial treatment for any
> other kind of special characters for the corresponding output language.
> Maybe those highlighting substitutions were better saved as arrays.
> Maybe those arrays should employ qr/.../ and '...' to avoid half of the
> backslashes and make things more readable.
> As you can see, there is a lot which could be improved about that
> script. And most improvements are not obvious, but require some kind of
> design decision, like what characters are special, how to escape them,
> where to handle what special cases, what other documentation syntax to
> emulate, stuff like that.
> If I don't forget it, maybe I can write a major patch for some of this
> some time next week. Before I start that, I would like to hear that you
> are interested in such a general improvement. You should also voice any
> thoughts you have as to what direction such improvements should take.
I am a bit reluctant to do major work on the current gdoc -- if major
work is going to be done (which would be great!), what I would prefer
would be a clean re-implementation of it, that would be copyrighted by
the FSF, and thus could be added to gnulib. This would make it easier
to re-use it between projects; I'm already using variously patched
versions of gdoc in several of my projects. This could be written with
some design documentation, that discuss how to deal with problems like
you have discovered.
Meanwhile, we should be open to consider hacks that work around the
larger problem. If all else fails, we could post-process this
particular man page to make it render properly.
More information about the Gnutls-devel