[tex-live] Bug in texdoc.tlu

Manuel Pégourié-Gonnard mpg at elzevir.fr
Sun Oct 18 00:09:38 CEST 2009


Philipp Stephani a écrit :
> a bug in texdoc.tlu causes texdoc to fail to open multiple files given
> as arguments:
> 
> ~ $ texdoc -d usrguide fntguide
> ...
> *** Results for: usrguide ***
> texdoc debug1: open
> "/usr/local/texlive/2009/texmf-dist/doc/latex/base/usrguide.pdf"
> *** Results for: fntguide ***
> texdoc debug1: open
> "/usr/local/texlive/2009/texmf-dist/doc/latex/base/usrguide.pdf"
> 
Oops, quite bad indeed. I must admit I never test using multiple
argumets, and almost forgot that it is supposed to be allowed.

> Explanation: the function how_to_view fails to initialize the global
> variable viewext, then in the second iteration a wrong branch is taken
> and the global variable viewer_replacement is not changed. The patch in
> the attachment fixes this.

Thanks, I'll review it and apply it.

> However, you should consider using local
> variables instead! (I have no experience at all in Lua, but all those
> global variables in the script would drive me mad.)
> 
Sure. The next thing I want to do with texdoc is reorganize and/or
rewrite parts of the code, I'm a bit lost myself sometimes.

Thanks,
Manuel.


More information about the tex-live mailing list