[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make CHECK_HTMLXREF on by default
From: |
Gavin Smith |
Subject: |
Make CHECK_HTMLXREF on by default |
Date: |
Thu, 10 Oct 2024 19:38:39 +0100 |
On Sun, Aug 25, 2024 at 02:13:07PM +0200, Patrice Dumas wrote:
> > > This is already possible, it is CHECK_HTMLXREF (which is set to 1 in the
> > > default case for EPUB as relative paths in EPUB are not possible).
> >
> > Good point. I think we should make CHECK_HTMLXREF=1 the default for
> > HTML as otherwise various web manuals will have broken links that nobody
> > knows about (we already found a broken link for "eglot", and the link
> > for "smtpmail" would have been broken if a newer version of Texinfo had
> > been used).
>
> I think that I agree on the principle, but I think that we should
> announce it before we make that change, such that people may voice their
> concern, and maybe we should do it after the release and not now?
The patch is at the bottom of this mail. There are also changes to
the results of the tests under tp/tests but wasn't sure if it
was worth clearing CHECK_HTMLXREF there as well.
diff --git a/NEWS b/NEWS
index 658d12d16f..5c69b881bd 100644
--- a/NEWS
+++ b/NEWS
@@ -57,6 +57,8 @@ See the manual for detailed information.
. Use <pre> instead of <div><em> for displaymath formatting.
. Remove border, cellpadding, cellspacing and align attributes, add
classes and use CSS when needed.
+ . CHECK_HTMLXREF set by default for warnings about links to unknown
+ external manuals
. EPUB:
stricter conformance for conformance checkers.
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index ee84d8a4be..a2aaff5e23 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -18314,12 +18314,12 @@ @node File Names and Links Customization for HTML
through the @file{htmlxref.cnf} file (@pxref{HTML Xref Configuration}).
@vindex CHECK_HTMLXREF
-Defaults directories and file names are used for cross-reference target manual
-not found through HTML Xref Configuration (@pxref{HTML Xref Link Basics}). If
-you want to make sure that all the manuals referred to are found in an HTML
-Xref configuration file, you should set @code{CHECK_HTMLXREF} to get a message
-for each external manual not in the HTML Xref configuration files. This could
-be relevant, for example, if you know that no manual is installed locally.
+Default directories and file names are used for cross-reference target
+manual not found through HTML Xref Configuration (@pxref{HTML Xref Link
+Basics}). By default, a warning is given for each external manual not in
+the HTML Xref configuration files. If you do not want warnings about such
+manuals, you should set @code{CHECK_HTMLXREF} to @samp{0}. This could
+be relevant, for example, if you know that manuals are installed locally.
@vindex HTMLXREF_MODE
@vindex HTMLXREF_FILE
@@ -18912,7 +18912,7 @@ @node HTML Customization Variables List
@item CHECK_HTMLXREF
Check that manuals which are the target of external
cross-references (@pxref{Four and Five Arguments}) are present in
-@file{htmlxref.cnf} (@pxref{HTML Xref Configuration}); default false.
+@file{htmlxref.cnf} (@pxref{HTML Xref Configuration}); default true.
@item CONTENTS_OUTPUT_LOCATION
If set to @samp{after_top}, output the contents at the end of the @code{@@top}
diff --git a/tp/Texinfo/Convert/converters_defaults.txt
b/tp/Texinfo/Convert/converters_defaults.txt
index 7830e194b8..b435e50305 100644
--- a/tp/Texinfo/Convert/converters_defaults.txt
+++ b/tp/Texinfo/Convert/converters_defaults.txt
@@ -47,6 +47,7 @@ CLOSE_QUOTE_SYMBOL undef
CONTENTS_OUTPUT_LOCATION after_top
CONVERT_TO_LATEX_IN_MATH undef
INDENTED_BLOCK_COMMANDS_IN_TABLE 0
+CHECK_HTMLXREF 1
COPIABLE_LINKS 1
DATE_IN_HEADER 0
DEFAULT_RULE <hr>
diff --git a/tp/Texinfo/Options.pm b/tp/Texinfo/Options.pm
index 5600a08175..695d09bb7b 100644
--- a/tp/Texinfo/Options.pm
+++ b/tp/Texinfo/Options.pm
@@ -286,6 +286,7 @@ my %converter_html_regular_options_defaults = (
'CONTENTS_OUTPUT_LOCATION' => 'after_top',
'CONVERT_TO_LATEX_IN_MATH' => undef,
'INDENTED_BLOCK_COMMANDS_IN_TABLE' => 0,
+ 'CHECK_HTMLXREF' => 1,
'COPIABLE_LINKS' => 1,
'DATE_IN_HEADER' => 0,
'DEFAULT_RULE' => '<hr>',
diff --git a/tp/Texinfo/XS/convert/converters_options.c
b/tp/Texinfo/XS/convert/converters_options.c
index 8bfe145cca..ffa3241c80 100644
--- a/tp/Texinfo/XS/convert/converters_options.c
+++ b/tp/Texinfo/XS/convert/converters_options.c
@@ -56,6 +56,7 @@ set_html_regular_options_defaults (OPTIONS *options)
option_set_conf (&options->CONTENTS_OUTPUT_LOCATION, -2, "after_top");
option_set_conf (&options->CONVERT_TO_LATEX_IN_MATH, -1, 0);
option_set_conf (&options->INDENTED_BLOCK_COMMANDS_IN_TABLE, 0, 0);
+ option_set_conf (&options->CHECK_HTMLXREF, 1, 0);
option_set_conf (&options->COPIABLE_LINKS, 1, 0);
option_set_conf (&options->DATE_IN_HEADER, 0, 0);
option_set_conf (&options->DEFAULT_RULE, -2, "<hr>");
@@ -113,6 +114,7 @@ add_html_regular_options_defaults (OPTIONS_LIST
*options_list)
add_new_option_value (options_list, GOT_char, "CONTENTS_OUTPUT_LOCATION",
-2, "after_top");
add_new_option_value (options_list, GOT_integer, "CONVERT_TO_LATEX_IN_MATH",
-1, 0);
add_new_option_value (options_list, GOT_integer,
"INDENTED_BLOCK_COMMANDS_IN_TABLE", 0, 0);
+ add_new_option_value (options_list, GOT_integer, "CHECK_HTMLXREF", 1, 0);
add_new_option_value (options_list, GOT_integer, "COPIABLE_LINKS", 1, 0);
add_new_option_value (options_list, GOT_integer, "DATE_IN_HEADER", 0, 0);
add_new_option_value (options_list, GOT_char, "DEFAULT_RULE", -2, "<hr>");
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 7acf989d23..74bfe753b6 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -424,6 +424,10 @@ sub set_converter_option_defaults($$;$)
if (!defined($converter_options->{'DEBUG'})) {
$converter_options->{'DEBUG'} = $debug;
}
+ if (!defined($converter_options->{'CHECK_HTMLXREF'})) {
+ # avoid bloating test results with warnings
+ $converter_options->{'CHECK_HTMLXREF'} = 0;
+ }
return $converter_options;
}
- Make CHECK_HTMLXREF on by default,
Gavin Smith <=