From: Hans Hagen <j.hagen@xs4all.nl>
To: Aditya Mahajan <adityam@umich.edu>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Problem with Filter Module in latent context beta
Date: Mon, 16 Apr 2018 19:55:31 +0200 [thread overview]
Message-ID: <6efaa974-8131-72cb-9fdc-1c9dc9066e82@xs4all.nl> (raw)
In-Reply-To: <nycvar.YAK.7.76.44.1804161249110.24460@ybpnyubfg.ybpnyqbznva>
On 4/16/2018 6:52 PM, Aditya Mahajan wrote:
> 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".
hm, i'll check it
#1 just means first argument in lua -)
use this:
\unprotect
\def\AnyFilename#1{\clf_getreadfilename{any}{.}{#1}}
\protect
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2018-04-16 17:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-14 12:21 Lutz Haseloff
2018-04-14 13:02 ` Aditya Mahajan
2018-04-14 15:59 ` Hans Hagen
2018-04-14 19:52 ` Lutz Haseloff
2018-04-14 22:07 ` Hans Hagen
2018-04-15 5:08 ` Aditya Mahajan
2018-04-15 10:21 ` Hans Hagen
2018-04-16 16:52 ` Aditya Mahajan
2018-04-16 17:55 ` Hans Hagen [this message]
2018-04-16 21:27 ` Aditya Mahajan
2018-04-16 21:59 ` Hans Hagen
2018-04-16 22:01 ` Aditya Mahajan
2018-04-17 8:09 ` Hans Hagen
2018-04-17 12:03 ` Aditya Mahajan
2018-04-17 17:19 ` Aditya Mahajan
2018-04-17 2:52 ` Aditya Mahajan
2018-04-17 3:48 ` Lutz Haseloff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6efaa974-8131-72cb-9fdc-1c9dc9066e82@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).