On Sun, Aug 25, 2024 at 12:58:21PM +0100, Gavin Smith wrote: > I think it makes sense to treat relative paths in a similar way to > absolute paths. The only question is whehther the path should be > relative to current working directory or the source file directory > (or possibly both). The current behaviour is to be relative to cwd > and so that should be kept.
Agreed. I'll do that change before the release. > > 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? > > We should probably implement the two changes proposed above, to me they > > are improvements. But I do not think that they will solve this use case > > either, if I understood well. > > > > To me, to solve this use case, a natural solution would be the > > possibility to prepend a directory to the list of directories searched > > for htmlxref.cnf, such that all the manuals in a project can use the > > same htmlxref.cnf to override or add to the default htmlxref.cnf. > > However, this is not possible for now. For other directory lists, we > > have this possibility, with -I (and we even have -P) for @include and > > images and for init files there is --conf-dir. > > If we implemented the XDG specification then the user could use or > append to XDG_CONFIG_DIRS, which is a colon-separated list of > directories to search. However, I am not sure if this is an appropriate > use of this variable as this is for user- or system-specific configuration, > but not necessarily for project-specific configuration. > > https://specifications.freedesktop.org/basedir-spec/latest/index.html > > So I suppose we need to devise some other mechanism for this. I think so too. > > htmlxref.cnf is searched for in a list of directories that I called > > @language_config_dirs in texi2any, with the idea that this list of > > directory could be (at least partly) implementation independent. For > > example, if texi2html was still developped, it could use the same search > > path for htmlxref.cnf files. For now, this @language_config_dirs list > > is used for two purposes: > > 1) to set some paths in the default directories list used for init files, > > with init subdirectory prepended. This corresponds to the path 6 to 9 > > in > > https://www.gnu.org/software/texinfo/manual/texi2any_api/html_node/Loading-Init-Files.html > > 2) for htmlxref files > > > > We could make this list of directories a customization option, like we > > currently do with INCLUDE_DIRECTORIES, which is influenced by -P and -I, > > for example named TEXINFO_LANGUAGE_DIRECTORIES, and add a command line > > option to prepend to this list? I think that having a customization option is a good thing in any case, but I am not sure about a command line option. > One possiblility is to use --conf-dir to look for htmlxref.cnf files as > well, although I haven't thought about this deeply. I am not sure either. It avoids adding a new option, but this is not exactly the same type of directory. -- Pat