texdoc icon indicating copy to clipboard operation
texdoc copied to clipboard

Suggesting trying tlmgr-info for packages without any document

Open wtsnjp opened this issue 5 years ago • 2 comments

Currently, for package names without any document, Texdoc automatically executes the fuzzy search and delivers the results. For instance, with a query "genmisc":

$ texdoc -v genmisc
texdoc info: Fuzzy search result: mentis
texdoc info: View command: open "/usr/local/texlive/2019/texmf-dist/doc/latex/mentis/mentis.pdf"
texdoc info: Setting environment LC_CTYPE to: en_US.UTF-8

However, a package named "genmisc" actually exists in TeX Live. IMO, in case that a package exactly matches to a query exists in TeX Live, it is better to say something like

$ texdoc <kw>
Package <kw> exists, but unfortunately no documentaiton found.
Try `tlmgr info <kw>` for some information about the package.

than silently performing the fuzzy search and deriver results for another package found with the feature.

At this point, the cache files generated by the database texlive.tlpdb does not include any information about packages without any document. This means Texdoc can't recognize the names of such packages. To implement this enhancement, such names also need to be included in the cache files.

wtsnjp avatar Mar 08 '20 08:03 wtsnjp

I certainly agree with you that a diagnostic is better than silently doing the fuzzy search in this case.

By the by, I hope to get rid of genmisc at some future point, but don't hold your breath ...

kberry avatar Mar 08 '20 22:03 kberry

Not that it matters for the general issue, but FYI, I just finished splitting genmisc into its component (mostly single file) packages and deleted genmisc itself. There are plenty of other packages that only exist in TL for testing, though, e.g., afm2pl.

kberry avatar Mar 12 '20 22:03 kberry