[texdoc] texdoc support for zipped files

Manuel Pégourié-Gonnard mpg at elzevir.fr
Mon Jun 29 12:35:11 CEST 2009


Hi Norbert, hi Frank,

first of all, sorry for my late reply.

Norbert Preining a écrit :
> texdoc warning: Unkown option "rm_dir"
>     from built-in defaults.  Skipping.
> [...]

Ok, that was easily fixed.

> - first the matching for ext did only get the last (.gz) extension and
>   not the viewer extension, so that broke and created the first error
>   same in texlive version
> 
Right, I applied your patch for this part, thanks for providing it.

> - then the command generated did not work because it did
> 	evince "/tmp/texdoc.d898asdf/file;rm -f/tmp/texdoc.d898asdf/file;rmdir /tmp/texdoc.d898asdf" &

I tried a somehow easier solution by changing the function that quotes the
filename.

>     I have worked around that, but it works ONLY!!!! if the viewing
>     command has NO options after the %s
> 	good
> 		( xpdf %s ) &
> 	bad
> 		( xpdf %s -option ) &

Right, my workaround has the same limitation. I don't think it's a big problem,
since most viewer commands should accept options first and filename at end (that
is, xpdf -option %s. I've added a comment in texdoc.cnf documenting this limitation.

> I attach a patch against 0.40. Unfortunately applying that change to
> 0.42 in texlive-svn did not work at all, again, because it seems you
> have changed some defs, I get:
> 	./texdoc.tlu:760: attempt to concatenate global 'unzip_command' (a nil value)
> so there might be other changes necessary.
>
I manually applied the first part of your patch to texdoc's trunk, and tried
another approach for the quoting problem. Now, taking svn r59 and just changing
support-zipped to true (line 104) should work:

mpg at roth:~% PDFVIEWER='(xpdf %s) &' texdoc -v4 foobar                     12:18
texdoc debug1: /home/mpg/bin/texdoc version 0.42+ svn r59
texdoc debug1: Configuration files are:
texdoc debug1: absent	/home/mpg/texmf/texdoc/texdoc-i386-linux-40.0.cnf
texdoc debug1: active	/home/mpg/texmf/texdoc/texdoc.cnf
texdoc debug1: active	/home/mpg/texmf/texdoc/texdoc-dist.cnf
texdoc debug1: absent
/home/mpg/usr/texlive/texmf-local/texdoc/texdoc-i386-linux-40.0.cnf
texdoc debug1: absent	/home/mpg/usr/texlive/texmf-local/texdoc/texdoc.cnf
texdoc debug1: disabled	/home/mpg/usr/texlive/2008/texmf/texdoc/texdoc.cnf
texdoc info: No exact match, trying full search mode.
texdoc debug1: (xpdf "/tmp/texdoc.xjo7na/foobar.pdf"; rm -f
/tmp/texdoc.xjo7na/foobar.pdf; rmdir /tmp/texdoc.xjo7na) &
mpg at roth:~% ls /tmp                                                       12:18
lost+found  wpa_ctrl_2712-1
mpg at roth:~%

The only remaining quirk is the spurious info message "trying full search mode".
But since I intend to rework the way texdoc matches filenames soon, I'll
probably leave it alone for now.

Please test and report any problems. If everything is ok for you, I'll probably
release the fixed version as 0.43 in TL, so that you can take the version from
TL svn, not texdoc svn.

Manuel.



More information about the texdoc mailing list