Hi,
there is a missing newline in the -on-error option description in the man page before the appease action. This results in the man page showing the following line:
Establish global error handlers, depending on action:.PP appease
The .PP macro needs to be at the start of a line, i.e., a newline needs to be inserted between the colon (:) and the .PP macro. This can be done using the following sed command (this works with GNU sed):
sed -i '434s/:.PP/:\n.PP/' doc/_clisp.1
Thanks,
Erik
P.S. I did not see a fitting milestone, since this documentation problem is neither an ANSI compliance issue, nor a build problem, nor a lisp error, nor a segfault. Thus I left the default selection.
While the above
sedcommand works in the current case, the.in the pattern should have been escaped:Well, it seems as if the file
doc/_clisp.1might be generated via XSLT transformations, but I have not yet found the source, nor have I found the relevant style sheet.The root cause for the issue might be found in either of them, or at least a workaround would likely pertain to the man page source or the style sheet. If I were told (e.g., via ticket comment) where to find those and how to generate just the
doc/_clisp.1file, I would be happy to look into finding a solution.I have created the attached patch via
sed -i '434s/:\.PP/:\n.PP/' doc/_clisp.1followed byhg diff.OK, I think I found the problematic file:
doc/clisp.xml.in. Comparing the domain encoding and on error sections it seems to me as if a newline should be inserted in front of<variablelist>:The attached patch shows the results of above command.
Please note that I did not test this and thus do not know if it really fixes the issue. I have not yet attempted to build the clisp sources….
Going deeper down this rabbit hole…:
doc/man.xslseems to be the style sheet entry point.PPOne might assume that the docbook transformation to man page format should ensure that formatting directives that need to be preceded by a newline are actually preceded by a newline. Thus one might assume that there may be a bug lurking in those style sheets, i.e., in a different project. I don't know. I have never used docbook, XSL style sheets, or XSL transformations myself.
I would suggest to look for a workaround (e.g., adjusting
doc/clisp.xml.in, or even post processing the generated man page withsed). In parallel, you might consider opening an issue with the docbook project, if you should come to the conclusion that the root cause lies there.Thanks,
Erik
Well, I have looked at the wrong repository, i.e., the one at SourceForge instead of the one at GitLab. The problem is still there, but the affected line in
doc/_clisp.1is 438, not 434. Thus the fix would besed -i '438s/:\.PP/:\n.PP/' doc/_clisp.1for the generated man page, and possiblysed -i '316s/:/:\n /' doc/clisp.xml.infor the XML source for (among other formats) the man page (same line as in SourceForge Mercurial repository).Since the generated
doc/_clisp.1man page is checked into the repository, and no XML tools are listed as build requirements, manually fixing the man page seems OK. Of course this would risk introducing a regression the moment it is regenerated, thus adding a post-processing step to the respectiveMakefile(which might be generated, too…) seems to be a more useful approach. But since the line number can change, thesedscript should not use a hard-coded line number. Just usingsed -E 's/(.)\.PP/\1\n.PP/' doc/_clisp.1works as well, and fixes another instance of the problem, too:Now that I have looked at the GitLab page, I see a bug tracker there, too.
The https://clisp.org page still only mentions the SourceForge bug tracker, not the GitLab one. It also still points to the SourceForge Mercurial repository, not to the GitLab Git repository, for the Development NEWS file. Might it be helpful if that web page would (1) mention the GitLab Git repository and (2) not link to the obsolete SourceForge Mercurial repository? Perhaps even the GitLab bug tracker could be mentioned there, if only to guide potential bug reporters to the preferred one, whichever that may be?
Is this bug tracker here at SourceForge still in use by the CLISP project?
I have also opened a bug report regarding this issue at Ubuntu, because I originally encountered the issue with CLISP packaged in Ubuntu 20.04: https://bugs.launchpad.net/bugs/2022970
I have further explored the man page generation rabbit hole, and attached two fresh patches against current
HEADin the GitLab git repository.The XML source seems not to be used by the normal build scripts. Thus modifying
doc/_clisp.1seems closest to the practical source of the man page. The attached patchclisp-gitlab-manpage-formatting-fix-via-_clisp.1.patchagainst current GitLabHEADdoes this for both current instances of the problem.But since the
doc/_clisp.1file seems to be generated from an XML source and then checked into the source code repository, adjustments to this file might get lost whenever a newly generated version is checked in. But thedoc/_clisp.1file is but a starting point for further transformations. Said transformations are affected via the (generated)src/Makefile. ThisMakefileis generated viasrc/makemake, itself generated fromsrc/makemake.in. The attached patchclisp-gitlab-manpage-formatting-fix-via-makemake.patchagainst current GitLabHEADadds anothersedinvocation to this transformation. (Changes tosrc/makemake.indo not result in rebuilding everything depending on it, thus this patch needs to be tested from a clean repository.)I have tested both patches successfully.
Thanks for the report. Fixed through https://gitlab.com/gnu-clisp/clisp/-/commit/f2bc9977107f39b0d3fb7478c75b67cecd19bcaf .