[texdoc] texdoctk: uninitialized $_ causes issues with KDE

Takuto ASAKURA tkt.asakura at gmail.com
Wed Mar 4 08:39:09 CET 2020


Hi John,

This mailing list is for texdoc, not texdoctk.
You are reporting an issue to a wrong place.

I'm not sure texdoctk is actively maintained these days,
but an email address of the author of texdoctk is written
in the man page of the program, so please try that one.

Alternatively, you can try to talk to TeX Live's general
mailing list (tex-live at tug.org). Someone there might know
better about the current situation of the program.

Best,
Takuto

> On 2020/03/04, at 10:24, John Scott <jscott at posteo.net> wrote:
> 
> Hello,
> 
> I was investigating why, when using texdoctk from KDE, it sometimes gives the error
> The file or folder smb://usr/share/texlive/texmf-dist/doc/latex/hyperref/manual.pdf does not exist.
> 
> I know very little about Perl, but I think I've identified the cause:
> 
> Use of uninitialized value $_ in concatenation (.) or string at /usr/bin/texdoctk line 676.
> at /usr/bin/texdoctk line 676.
>        main::finddoc(undef, "/usr/share/texlive/texmf-dist/doc/latex/hyperref/manual.pdf", Tk::Frame=HASH(0x55713adfc100)) called at /usr/bin/texdoctk line 461
>        main::viewslc("/usr/share/texlive/texmf-dist/doc/latex/hyperref/manual.pdf", Tk::Frame=HASH(0x55713adfc100)) called at /usr/bin/texdoctk line 375
>        main::__ANON__[/usr/bin/texdoctk:375](Tk::Listbox=HASH(0x55713adb9490)) called at /usr/lib/x86_64-linux-gnu/perl5/5.30/Tk.pm line 424
>        eval {...} called at /usr/lib/x86_64-linux-gnu/perl5/5.30/Tk.pm line 424
>        Tk::MainLoop() called at /usr/bin/texdoctk line 276
> 
> and also, when a path is given with two leading slashes like //usr/..., that
> is what makes KDE assume smb://. If $_ is empty, that leaves the slash after
> it still there.
> 
> This small patch gets it working on my system:
> --- /usr/bin/texdoctk   2020-02-17 17:37:38.000000000 -0500
> +++ ./texdoctk-my       2020-03-03 20:05:37.580339295 -0500
> @@ -673,7 +673,7 @@
>     my($slcdoc,$slc,$parframe)=@_;
>     my ($dummy,$status);
>   SLCDOCFIND: foreach ($texdocpath,$distdocpath,$docdocpath) {
> -      $slcdoc="$_/$slc";
> +      $slcdoc="$slc";
>       if (-e $slcdoc) {
> #       found where it should be
>        return $slcdoc;
> 
> I wonder if, on others' installations, $_ is ever non-empty, and maybe this
> checkig the additional path has never worked at all.




More information about the texdoc mailing list.