texinfo-commits
[Top][All Lists]
Advanced

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

texinfo ChangeLog doc/texinfo.txi doc/version.t...


From: Patrice Dumas
Subject: texinfo ChangeLog doc/texinfo.txi doc/version.t...
Date: Tue, 17 Jan 2012 00:18:05 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/01/17 00:18:05

Modified files:
        .              : ChangeLog 
        doc            : texinfo.txi version.texi 
        tp             : texi2any.pl 
        tp/Texinfo     : Common.pm 
        tp/Texinfo/Convert: Converter.pm 

Log message:
                * tp/texi2any.pl: if SORT_ELEMENT_COUNT is set, dump elements 
names
                sorted by line count (or word count if 
ISORT_ELEMENT_COUNT_COUNT_WORDS
                is set) in the associated file.
                * doc/texinfo.txi (Configuration Variables): document 
SORT_ELEMENT_COUNT
                and SORT_ELEMENT_COUNT_COUNT_WORDS.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.1309&r2=1.1310
http://cvs.savannah.gnu.org/viewcvs/texinfo/doc/texinfo.txi?cvsroot=texinfo&r1=1.411&r2=1.412
http://cvs.savannah.gnu.org/viewcvs/texinfo/doc/version.texi?cvsroot=texinfo&r1=1.111&r2=1.112
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.102&r2=1.103
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.116&r2=1.117
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Converter.pm?cvsroot=texinfo&r1=1.75&r2=1.76

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.1309
retrieving revision 1.1310
diff -u -b -r1.1309 -r1.1310
--- ChangeLog   16 Jan 2012 22:35:38 -0000      1.1309
+++ ChangeLog   17 Jan 2012 00:17:57 -0000      1.1310
@@ -5,6 +5,12 @@
        * doc/texinfo.txi (Configuration Variables): document TEXTCONTENT
        and RAW_TEXT.
 
+       * tp/texi2any.pl: if SORT_ELEMENT_COUNT is set, dump elements names
+       sorted by line count (or word count if ISORT_ELEMENT_COUNT_COUNT_WORDS
+       is set) in the associated file.
+       * doc/texinfo.txi (Configuration Variables): document SORT_ELEMENT_COUNT
+       and SORT_ELEMENT_COUNT_COUNT_WORDS.
+
 2012-01-15  Patrice Dumas  <address@hidden>
 
        * doc/texinfo.txi (Configuration Variables for @@-Commands):

Index: doc/texinfo.txi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.txi,v
retrieving revision 1.411
retrieving revision 1.412
diff -u -b -r1.411 -r1.412
--- doc/texinfo.txi     16 Jan 2012 22:35:38 -0000      1.411
+++ doc/texinfo.txi     17 Jan 2012 00:18:02 -0000      1.412
@@ -1,5 +1,5 @@
 \input texinfo.tex    @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.411 2012/01/16 22:35:38 pertusus Exp $
address@hidden $Id: texinfo.txi,v 1.412 2012/01/17 00:18:02 pertusus Exp $
 @c Ordinarily, Texinfo files have the extension .texi.  But texinfo.texi
 @c clashes with texinfo.tex on 8.3 filesystems, so we use texinfo.txi.
 
@@ -17473,6 +17473,15 @@
 If set, use a simple preformatted style for the menu, instead of
 breaking down the different parts of the menu.  @xref{Menu Parts}.
 
address@hidden SORT_ELEMENT_COUNT
+Name of a file where a list of elements (nodes or sections, depending
+on the output format generated) sorted by the number of lines they contain 
+after removal of @@-commands are dumped.
+
address@hidden SORT_ELEMENT_COUNT_COUNT_WORDS
+When sorting elements by their counting, use words count instead
+of line counts.
+
 @c @item SPLIT_INDEX
 @c For address@hidden  If set, the output is split, and the output from
 @c @code{@@printindex} happens in a sectioning element at the level of
@@ -21539,7 +21548,7 @@
 Revision Control System}) or other version control systems, which
 expand it into a string such as:
 @example
-$Id: texinfo.txi,v 1.411 2012/01/16 22:35:38 pertusus Exp $
+$Id: texinfo.txi,v 1.412 2012/01/17 00:18:02 pertusus Exp $
 @end example
 (This is useful in all sources that use version control, not just manuals.)
 You may wish to include the @samp{$Id:} comment in the @code{@@copying}

Index: doc/version.texi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/version.texi,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -b -r1.111 -r1.112
--- doc/version.texi    16 Jan 2012 22:35:39 -0000      1.111
+++ doc/version.texi    17 Jan 2012 00:18:04 -0000      1.112
@@ -1,4 +1,4 @@
address@hidden UPDATED 16 January 2012
address@hidden UPDATED 17 January 2012
 @set UPDATED-MONTH January 2012
 @set EDITION 4.13.90
 @set VERSION 4.13.90

Index: tp/texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -b -r1.102 -r1.103
--- tp/texi2any.pl      15 Jan 2012 20:51:14 -0000      1.102
+++ tp/texi2any.pl      17 Jan 2012 00:18:04 -0000      1.103
@@ -487,7 +487,7 @@
   ['USE_UP_NODE_FOR_ELEMENT_UP', 1],
   ['USE_REL_REV', 0],
   ['USE_LINKS', 0],
-  ['USE_NODES', undef],
+  ['USE_NODES', 0],
   ['NODE_FILENAMES', 0],
   ['USE_NUMERIC_ENTITY', 1],
   ['SPLIT', ''],
@@ -1140,6 +1140,40 @@
       _exit($error_count, address@hidden);
     }
   }
+  if (defined(get_conf('SORT_ELEMENT_COUNT')) and $file_number == 0) {
+    my $converter_element_count_file 
+      = Texinfo::Convert::TextContent->converter($converter_options);
+    my $use_sections = (! $formats_table{$format}->{'nodes_tree'}
+                        or (defined($converter->get_conf('USE_NODES'))
+                            and !$converter->get_conf('USE_NODES')));
+    my ($sorted_name_counts_array, $sort_element_count_text)
+        = Texinfo::Convert::Converter::sort_element_counts(
+               $converter_element_count_file, $tree, $use_sections,
+                             get_conf('SORT_ELEMENT_COUNT_COUNT_WORDS'));
+
+    my $sort_element_count_file = get_conf('SORT_ELEMENT_COUNT'); 
+    my $sort_element_count_fh = Texinfo::Common::open_out($converter, 
+                                             $sort_element_count_file);
+    my $error_sort_element_count_file;
+    if (defined ($sort_element_count_fh)) {
+      print $sort_element_count_fh $sort_element_count_text;
+      
+      if (!close ($sort_element_count_fh)) {
+        warn (sprintf(__("Error on closing internal links file %s: %s\n"), 
+                      $sort_element_count_file, $!));
+        $error_sort_element_count_file = 1;
+      }
+      $converter->register_close_file($sort_element_count_file);
+    } else {
+      warn (sprintf(__("Could not open %s for writing: %s\n"), 
+                    $sort_element_count_file, $!));
+      $error_sort_element_count_file = 1;
+    }
+    if ($error_sort_element_count_file) {
+      $error_count++;
+      _exit($error_count, address@hidden);
+    }
+  }
 }
 
 foreach my $unclosed_file (keys(%unclosed_files)) {

Index: tp/Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -b -r1.116 -r1.117
--- tp/Texinfo/Common.pm        16 Jan 2012 22:54:42 -0000      1.116
+++ tp/Texinfo/Common.pm        17 Jan 2012 00:18:05 -0000      1.117
@@ -172,6 +172,7 @@
   'USE_UP_NODE_FOR_ELEMENT_UP',
   'BEFORE_OVERVIEW', 'AFTER_OVERVIEW',
   'BEFORE_TOC_LINES', 'AFTER_TOC_LINES', 
+  'SORT_ELEMENT_COUNT', 'SORT_ELEMENT_COUNT_COUNT_WORDS',
 # FIXME document
   'TEXTCONTENT_COMMENT',
 # FIXME Not strings. To be documented.

Index: tp/Texinfo/Convert/Converter.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Converter.pm,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- tp/Texinfo/Convert/Converter.pm     16 Jan 2012 22:09:48 -0000      1.75
+++ tp/Texinfo/Convert/Converter.pm     17 Jan 2012 00:18:05 -0000      1.76
@@ -1040,7 +1040,7 @@
         $name = Texinfo::Convert::Texinfo::convert({'contents' 
           => $command->{'extra'}->{'nodes_manuals'}->[0]->{'node_content'}});
       } else {
-        $name = "address@hidden>{'cmdname'} "
+        $name = "address@hidden>{'cmdname'}"
           .Texinfo::Convert::Texinfo::convert($command->{'args'}->[0]);
       }
     }



reply via email to

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