On Wed, Sep 23, 2026 at 02:45:13PM +0300, Eli Zaretskii wrote: > > Date: Wed, 23 Sep 2026 11:18:34 +0200 > > From: Patrice Dumas <[email protected]> > > > > I think that ignoring the directory from @setfilename when the -o > > argument is determined to be a directory would be better, both more > > useful, simpler and more consistent with -o with a file name as > > argument. > > That might be better, but it is certain to break someone's setup out > there, so MHO would be not to make such a change.
The manual describes @setfilename argument as a base file name rather than a path, so having a path in @setfilename should be considered as a dangerous setup. It is never said explicitly that a path is wrong, though, so it could happen, but I think that it is fair if the behaviour changes (here in relation to -o) when it is confusing and inconsistent. I actually thought that the directory part of path as @setfilename argument was ignored, and I was quite surprised by the result. > > We should make sure that this does not break the emacs manual, but I > > think that it should not, as this use of @setfilename probably predates > > having -o recognize directories, which, I believe, started with Texinfo > > 5.0. Therefore I doubt that the emacs build system also uses -o DIR > > (except for split HTML). I had a look at emacs sources, and I found > > only non-split output with -o output_file being used that should be ok. > > It is very likely that there are other places where the emacs manuals > > are built, though, as the HTML manual linked to from the main emacs page > > is split. > > Please also look in admin/admin.el, there are commands there used by > the Emacs maintainers to generate the HTML manuals (which are then > uploaded to the GNU documentation site via CVS). I think I do see > there at least one case where "-o" is used for split-HTML. If I read the code well (which is not so easy, but I think I got it right), it is a -o file_name when not split, so it should also be ok. -- Pat
