bug-texinfo
[Top][All Lists]
Advanced

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

Re: makeinfo bug


From: Karl Berry
Subject: Re: makeinfo bug
Date: Wed, 20 Aug 2014 23:55:56 GMT

Hi Mahlon,

    The largest of these is that v:5.1 ignores the '--fill-column' option.

Thanks for the report.  It seems that the value from the cmdline was not
being propagated to the parsing; the change below appears to fix this.
I can't say I'm 100% sure this function (converter_initialize in
Plaintext.pm) is the right place to change it (Patrice, I trust you will
check me at some point).  We should also add a test for it.

Unfortunately, as far as I can see, the 4.13 makeinfo (that is, both the
original GNU release and the one that comes with CentOS 6) actually
wraps at column 77 given -f 78.  That is, the crucial lines in the
example come out like this with those 4.13's (hopefully your mailer
won't wrap anything; the `l' comes out at the beginning of the line):

123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-
                                                                col 72 |     | 
col78
This sentence strolls happily through the forest, waiting for the m a gi c a
l column seventy-eight (78) to arrive.

With the 5.x makeinfo plus the change below, I get the apparently-expected:
                                                                col 72 |     |
This sentence strolls happily through the forest, waiting for the m a gi c a l
column seventy-eight (78) to arrive.

It looks like you're using a distro version of makeinfo.  Maybe they
fixed an off-by-one error in the C makeinfo without telling me (or I've
forgotten about it).  I'm not sure how else to explain your results.

    This means that 50+ pages of documentation, carefully-formatted for
    '--fill-column=78' now look really bad.

The fact that you carefully formatted your source for a certain fill
column makes me think we should add a @fillcolumn command, since in such
a case it's an attribute of the document, not the processing.
(Analogous to the commands we already have like @paragraphindent,
@frenchspacing, @footnotestyle, etc.)

Thanks,
Karl

--- Texinfo/Convert/Plaintext.pm        (revision 5758)
+++ Texinfo/Convert/Plaintext.pm        (working copy)
@@ -358,6 +358,10 @@
   $self->{'context'} = [];
   $self->{'format_context'} = [];
   $self->{'empty_lines_count'} = undef;
+  if ($self->get_conf('FILLCOLUMN')) {
+    $self->{'fillcolumn'} = $self->get_conf('FILLCOLUMN');
+    # else it's already set via the defaults
+  }
   $self->push_top_formatter('_Root_context');
   push @{$self->{'count_context'}}, {'lines' => 0, 'bytes' => 0,
                                      'locations' => []};



reply via email to

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