bug-texinfo
[Top][All Lists]
Advanced

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

Re: [Gawk manual] Several empty list items in the HTML version


From: Gavin Smith
Subject: Re: [Gawk manual] Several empty list items in the HTML version
Date: Tue, 8 Oct 2024 20:13:12 +0100

On Sun, Oct 06, 2024 at 01:33:03PM +0200, Patrice Dumas wrote:
> On Sat, Oct 05, 2024 at 11:22:06AM -0600, arnold@skeeve.com wrote:
> > Hi.
> > 
> > Apologies for the delay in replying, I've been offline for several
> > days.
> > 
> > Thank you for the report. I have fixed all the cases in the manual
> > and will push it to Git shortly.  The HTML manual will be updated
> > when I next make a release.
> > 
> > IMHO this is really a makeinfo bug (and indeed, the Info file doesn't
> > change after this update), so I'm cc-ing the texinfo folks.
> 
> The code that moves index entries after @item was actually confused by
> @subentry.  Should be fixed in:
> https://git.savannah.gnu.org/cgit/texinfo.git/commit/?id=5e8fccc9bd1fb775654ebb2e2334682a83cc47c0
> 
> Thanks for the report!
> 
> @Gavin maybe to be considered for 7.1.2?

I have ported it to the release/7.1 branch (see end of mail).  I only had
to do the Perl code as there wasn't a C version of this on release/7.1.
There may never be a 7.1.2 release but it is there just in case.

I will commit this as soon as I can work out how to switch to and
build from release/7.1 and run the tests.  At the moment I have a
mysterious error when running configure:

In file included from /usr/lib/x86_64-linux-gnu/perl/5.34/CORE/perl.h:918,
                 from TestXS.xs:5:
./gnulib/lib/locale.h:755:11: fatal error: setlocale_null.h: No such file or 
directory
  755 | # include "setlocale_null.h"
      |           ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1729: TestXS.lo] Error 1

It could only be because I switched from the master branch and there
is something left over from building from the master branch.



diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index d7b146bc9c..abc2b000af 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -2356,7 +2356,10 @@ sub move_index_entries_after_items($)
                    and 
$previous_ending_container->{'contents'}->[-1]->{'type'} eq 
'index_entry_command')
                   or 
($previous_ending_container->{'contents'}->[-1]->{'cmdname'}
                       and 
($previous_ending_container->{'contents'}->[-1]->{'cmdname'} eq 'c'
-                           or 
$previous_ending_container->{'contents'}->[-1]->{'cmdname'} eq 'comment')))) {
+                           or 
$previous_ending_container->{'contents'}->[-1]->{'cmdname'} eq 'comment'
+                           # subentry is not within the index entry in the tree
+                           or 
$previous_ending_container->{'contents'}->[-1]->{'cmdname'} eq 'subentry')
+                  ))) {
         unshift @gathered_index_entries, pop 
@{$previous_ending_container->{'contents'}};
       }
       #print STDERR "Gathered: @gathered_index_entries\n";
diff --git a/tp/t/index_before_item.t b/tp/t/index_before_item.t
index 89a74df546..184b4ed389 100644
--- a/tp/t/index_before_item.t
+++ b/tp/t/index_before_item.t
@@ -5,7 +5,7 @@ use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
-BEGIN { plan tests => 6; }
+BEGIN { plan tests => 7; }
 
 use Texinfo::Parser qw(parse_texi_piece);
 use Texinfo::Common qw(move_index_entries_after_items_in_tree);
@@ -164,3 +164,16 @@ run_test('@itemize i
 @item e--mph item
 @end itemize
 ', 'only comment');
+
+run_test('@enumerate
+@cindex pattern @subentry variable
+@item
+Set the variable
+@end enumerate
+', '@enumerate
+@item
+@cindex pattern @subentry variable
+Set the variable
+@end enumerate
+', 'subentry');
+




reply via email to

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