[NTG-context] Problem with Filter Module in latent context beta

Aditya Mahajan adityam at umich.edu
Mon Apr 16 18:52:49 CEST 2018


On Sun, 15 Apr 2018, Hans Hagen wrote:

> \start
> \def\obeyedline{\blank[line]} \obeylines

Thanks! Not sure why I wasn't using that since the beginning.

I am testing with the latest beta and I get another bug with reading http 
files. This is a simplified version of what I use in the filter module:

    \unprotect
     \def\AnyFilename#1%
         {\ctxcommand{getreadfilename("any",".","#1")}}

     \def\ProcessFile#1%
       {\edef\InputFile{\AnyFilename{#1}}%
        \InputFile
        \typefile[\InputFile]}
     \protect
     \starttext
     \ProcessFile{http://cim.mcgill.ca/~adityam/index.html}
     \stoptext

With the latest beta, I get the following error:


...inimals/texmf-context/tex/context/base/mkiv/file-res.lua:147: bad 
argument #1 to 'find' (string expected, got nil)
stack traceback:
         [C]: in function 'string.find'
         ...inimals/texmf-context/tex/context/base/mkiv/file-res.lua:147: 
in upvalue 'action1'
         [string "local action = tokens._action..."]:4: in field 
'getreadfilename'
         [ctxlua]:1: in main chunk


Not sure why #1 is being passed to the lua function instead of the 
expanded value of "#1".

Aditya


More information about the ntg-context mailing list