[texdoc] Weird behavior of `texdoc'

Paulo Roberto Massa Cereda cereda.paulo at gmail.com
Wed Feb 15 18:13:36 CET 2017


Friends,

I have something quite interesting to report.

As I mentioned in my previous communication, I was able to reproduce the 
issue reported by Yudai. My current configuration: Sierra (all updates) 
+ TeX Live 2016 (all updates) + iTerm (last version).

I opened a Lua session in my machine:

oxford:~ paulo$ lua
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
 > os.execute('less 
"/usr/local/texlive/2016/texmf-dist/doc/latex/bxjalipsum/README.md"')

The Markdown file was correctly displayed.

I created a Lua file -- test.lua -- with

---8<------------
os.execute('less 
"/usr/local/texlive/2016/texmf-dist/doc/latex/bxjalipsum/README.md"')
--->8------------

and ran it.

oxford:~ paulo$ lua test.lua

worked like a charm. However,

oxford:~ paulo$ texlua test.lua

raised the issue.

My guess is that texdoc is not the one to be blamed for this behaviour, 
but the underlying texlua interpreter.

One for dev-luatex at ntg.nl, perhaps? Karl, Manuel?

All the best!

Paulo

Em 14-02-2017 20:06, Karl Berry escreveu:
>     P.S. comand should be command, I guess ;-)
>
> Indeed. Thanks, will fix.
>
>     Strangely, manually running `less "/usr/local/œôó¦` displays the
>     characters correctly.
>
> Yes, that is strange. texdoc is calling the Lua function os.execute().
> Maybe it clears the environment, including the locale?
> But that wouldn't explain why it is only failing on your system.
>
> Grepping for locale in texmf-dist/scripts/texdoc, I see a function
> setup_config_from_locale in the file config.tlu.  Maybe you could try
> commenting the call to that function at line 501 (put the string "--" at
> the beginning of the line, or just delete it) and see if that makes a
> difference.  I have no specific idea of why it would be the problem, but
> it's what I see ... --best, karl.
>


More information about the texdoc mailing list