[NTG-context] Fancybreak - no hope?

Wolfgang Schuster schuster.wolfgang at gmail.com
Tue Aug 19 21:20:05 CEST 2014

Am 19.08.2014 um 21:02 schrieb Hans Hagen <pragma at wxs.nl>:

>>> I see no message that the module is loaded which is weird. But your
>>> format is from may, so are you sure you use the latest versions of all?
>> It’s a bug in the commands.usemodules function in file-mod.lua which
>> sets a wrong status value
>> when you try to load a notexsitend file. Below is a minimal example
>> where you get the right message
>> when you uncomment the \enabledirectives line.
>> %\enabledirectives[modules.permitunprefixed]
>> \usemodule[funnyname]
>> \starttext
>> \stoptext
> ok, so we should have:
>    if not status or status == 0 then

Won’t a change like this make more sense?

Files without a prefix are only loaded when you enable the required directive.

function commands.usemodules(prefix,askedname,truename)
            if status then
                -- ok, don't change
            elseif find(truename,"%-") and usemodule(truename) then
                -- assume a user namespace
                report_modules("using user prefixed file %a",truename)
                status = 1
-           elseif not permit_unprefixed then
-               -- forget about it
-           elseif usemodule(truename) then
+           elseif permit_unprefixed and usemodule(truename) then
                report_modules("using unprefixed file %a",truename)
                status = 1
                status = 0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140819/e1bb26cf/attachment.html>

More information about the ntg-context mailing list