From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87714 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: Re: reading modules broken? Date: Sat, 7 Jun 2014 10:11:47 +0000 Message-ID: <648267FE-8745-4AA2-934E-BA5B5F13A016@uva.nl> References: <539229FD.8040405@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1797096967==" X-Trace: ger.gmane.org 1402135930 7284 80.91.229.3 (7 Jun 2014 10:12:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Jun 2014 10:12:10 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 07 12:12:06 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WtDbU-0006wH-Qf for gctc-ntg-context-518@m.gmane.org; Sat, 07 Jun 2014 12:12:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1877F10213 for ; Sat, 7 Jun 2014 12:12:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YCZCjm7sgwrU for ; Sat, 7 Jun 2014 12:12:00 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 5335010239 for ; Sat, 7 Jun 2014 12:11:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B0F6F101E7 for ; Sat, 7 Jun 2014 12:11:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id K6BZ8NQMntgB for ; Sat, 7 Jun 2014 12:11:49 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 0BE2C101E2 for ; Sat, 7 Jun 2014 12:11:49 +0200 (CEST) Original-Received: from HUB01.uva.nl (hub01.uva.nl [146.50.108.230]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s57ABmtt026790 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Sat, 7 Jun 2014 12:11:48 +0200 Original-Received: from MBX02.uva.nl ([169.254.2.158]) by HUB01.uva.nl ([2002:9232:6737::9232:6737]) with mapi id 14.03.0181.006; Sat, 7 Jun 2014 12:11:47 +0200 Thread-Topic: [NTG-context] reading modules broken? Thread-Index: AQHPgb5otYg8N9ZXjke/H7ASgJrTyZtkbV6AgADfZYA= In-Reply-To: <539229FD.8040405@wxs.nl> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [83.81.49.118] X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=146.50.108.230; country=NL; region=North Holland; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QMbmbMBk - 9702923d4e8b - 20140607 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:87714 Archived-At: --===============1797096967== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_648267FE87454AA2934EBA5B5F13A016uvanl_" --_000_648267FE87454AA2934EBA5B5F13A016uvanl_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hans Hagen > wrote: modules have names like m- x- s- p- u- Remark: u- does not work out of the box, only when called as \usemodule[u][= modulename]. I had consulted the Wiki that tells us: Usage When you load a module with \usemodule[modulename] ConTeXt looks for a file= with the following names: * m-modulaname (core module) * p-modulename (private module) * s-modulename (ConTeXt style file) * x-modulename (XML module) * t-modulename (Third party module) * modulename Once a file is found ConTeXt stops the search and loads the found file (onl= y once). When you have two file with the same name but different prefixes you can te= ll ConTeXt which file it should load with \usemodule[][modulename] I checked \usemodule[modulename] with all these prefixes and they work ok. But the last item in the list (marked red for clarity) does not (any more).= That item suggest \usemodule[module-name] should work. I suggest someone i= n charge of the Wiki takes a look and removes the last item when my observa= tions turn out to be correct. A final question. Using the \usemodule[][modulename] form, one can = use any prefix letter. In fact, any prefix seems to work. If that functiona= lity stays, it will give more flexibility in the naming scheme for modules.= Please confirm if this will be the case or if module naming in the future = will be restricted to a one letter scheme or even restricted to [mpsxt] exc= lusively as mentioned in the Wiki. Hans van der Meer On 06 Jun 2014, at 22:52, Hans Hagen > = wrote: On 6/6/2014 9:35 PM, Meer, H. van der wrote: My modules are not read anymore, allthough Context thinks it does. This mus= t have been the case for some time. I ran a test with an older version whic= h demonstrates that the change in behaviour must have occurred after januar= y second. Minimal example follows. Hans van der Meer Module code in file module-test is: \writestatus{HVDM}{Module has been read} \endinput Test code in file moduletest.tex is: \usemodule[module-test] \starttext module testing look into the log. \stoptext modules have names like m- x- s- p- u- and the lookup happens in a certain order without prefix, and checking for = mkvi, mkiv, mkii or tex suffixes so in your case it should be something u-hvdm-test or so (user hvdm test) so you were just lucky that in the past modules-* worked the loading is probably ok because test.* is loaded In the log I find: This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4972) \write18 enabled. open source > 1 > 1 > /Users/hansm/tex/context-20/tex/texmf-context/tex= /context/base/cont-yes.mkiv ConTeXt ver: 2014.06.05 23:04 MKIV beta fmt: 2014.6.6 int: english/engli= sh open source > 2 > 3 > /Users/hansm/tex/test-tex/modules/moduletest.tex resolvers > modules > 'module-test' is already loaded <-- wr= ongly thinks it is loaded It says the module is already loaded, but the telltale \writestatus is abse= nt. Running the same code with an older version of ConTeXt does load the module= : ConTeXt ver: 2014.01.02 20:05 MKIV current fmt: 2014.1.2 int: english/en= glish (/Users/hansm/tex/test-tex/modules/moduletest.tex resolvers > modules > 'module-test' is loaded <-- loa= ds as it should (module-test.tex HVDM > Module has been read ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.n= l/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________ -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.n= l/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex= .aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________ --_000_648267FE87454AA2934EBA5B5F13A016uvanl_ Content-Type: text/html; charset="us-ascii" Content-ID: <59AD2594F8D2B646AB4EA13872584868@uva.nl> Content-Transfer-Encoding: quoted-printable
Hans Hagen <p= ragma@wxs.nl> wrote:
modules have names like
m-
x-
s-
p-
u-

Remark: u- does not work out of the box, only when called as \usemodule[u][= modulename].

I had consulted the Wiki that tells us:

Usage

When you load a module with \usemodule[modulename] ConTeXt looks for a file= with the following names:
  • m-modulaname (core module)
  • p-modulename (private module)
  • s-modulename (ConTeXt style file)
  • x-modulename (XML module)
  • t-modulename (Third party module)
  • modulename
Once a file is found ConTeXt stops the search and loads the found file (onl= y once).
When you have two file with the same name but different prefixes you can te= ll ConTeXt which file it should load with
\usemodule[<pr= efix>][modulename]

I checked \usemodule[modulename] with all these prefixes and they work= ok. 
But the last item in the list (marked red for clarity) does not (any m= ore). That item suggest \usemodule[module-name] should work. I suggest some= one in charge of the Wiki takes a look and removes the last item when my ob= servations turn out to be correct.

A final question. Using the \usemodule[<prefix>][modulename] for= m, one can use any prefix letter. In fact, any prefix seems to work. If tha= t functionality stays, it will give more flexibility in the naming scheme f= or modules. Please confirm if this will be the case or if module naming in the future will be restricted to a one = letter scheme or even restricted to [mpsxt] exclusively as mentioned in the= Wiki.

Hans van der Meer



On 06 Jun 2014, at 22:52, Hans Hagen <pragma@wxs.nl> wrote:

On 6/6/2014 9:35 PM, Meer, H. van der wrote:
My modules are not read anymore, allthough Contex= t thinks it does. This must have been the case for some time. I ran a test = with an older version which demonstrates that the change in behaviour must = have occurred after january second.
Minimal example follows.

Hans van der Meer

Module code in file module-test is:
\writestatus{HVDM}{Module has been read}
\endinput

Test code in file moduletest.tex is:
\usemodule[module-test]
\starttext
module testing look into the log.
\stoptext

modules have names like

m-
x-
s-
p-
u-

and the lookup happens in a certain order without prefix, and checking for = mkvi, mkiv, mkii or tex suffixes

so in your case it should be something

u-hvdm-test

or so (user hvdm test)

so you were just lucky that in the past modules-* worked

the loading is probably ok because test.* is loaded

In the log I find:

This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4972)
 \write18 enabled.
open source     > 1 > 1 > /Users/hansm/tex/con= text-20/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2014.06.05 23:04 MKIV beta  fmt: 2014.6.6  int= : english/english

open source     > 2 > 3 > /Users/hansm/tex/tes= t-tex/modules/moduletest.tex
resolvers       > modules > 'module-tes= t' is already loaded          = <-- wrongly thinks it is loaded

It says the module is already loaded, but the telltale \writestatus is abse= nt.

Running the same code with an older version of ConTeXt does load the module= :

ConTeXt  ver: 2014.01.02 20:05 MKIV current  fmt: 2014.1.2  = int: english/english
(/Users/hansm/tex/test-tex/modules/moduletest.tex
resolvers       > modules > 'module-tes= t' is loaded           &n= bsp;     <-- loads as it should
(module-test.tex
HVDM            >= Module has been read




___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context"> http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.= nl / http://tex.aanhet.net
archive  : = http://foundry.supelec.fr/projects/contextrev/
wiki     : http://= contextgarden.net
___________________________________________________________________________= ________



-- 

-----------------------------------------------------------------
            &nb= sp;            =             &nb= sp;   Hans Hagen | PRAGMA ADE
            &nb= sp;Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | voip: 087 875 68 74 | = www.pragma-ade.com
            &nb= sp;            =             &nb= sp;      | www.pragma-pod.nl=
-----------------------------------------------------------------
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context">http://www.ntg.nl= /mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl /&= nbsp;http://tex.aanhet.net archive  : http://foundry.supelec.= fr/projects/contextrev/
wiki     : <= /span>http://contextgarden.net ___________________________________________________________________________= ________

--_000_648267FE87454AA2934EBA5B5F13A016uvanl_-- --===============1797096967== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1797096967==--