Re: [NTG-context] [luatex-fonts] +mkmk; +mark results in call to undefined onetimemessage()

2013-05-12 Thread Hans Hagen

On 5/12/2013 9:19 PM, Philipp Gesang wrote:

Hi,

in luatex-plain, the example below

 \font\grk=file:LinLibertine_R.otf:+mark;+mkmk;mode=node at 14.4pt
 {\grk
  μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος\hfill\break
  οὐλομένην, ἣ μυρί' Ἀχαιοῖς ἄλγε' ἔθηκε}
 \bye

triggers a call to onetimemessage() which is nil at the time when
the upvalue is created. Can we have calls to
fonts.loggers.onetimemessage() instead, so we can override that
one with our own logger?


hm, don't assume that all that logging will be exposed forever in a 
generic way; a lot is for specific tracing only and i more or less 
assume that for problematic issues one will use context as benchmark 
anyway (in fact, I've even been thinking of a stripped down generic 
variant i.e. no unneccessary more context and dev related overhead 
(leaner and meaner) which is possible once we're stable.


So it's more convenient if I just uncommented the trace-bugs

elseif trace_bugs then

which means that the message will not be called outside context at all.


On a related note, we would like to reduce verbosity. In
luatex-basics-gen.lua, could we have:

logs = logs or {
   new=dummyreporter,
   reporter=dummyreporter,
   messenger=dummyreporter,
   report=dummyfunction,
}

So we can provide our own “logs” table?


That needs thinking, as i cannot guarantee that logging will stay the 
same for those modules; a wrapper might be more stable, so for the 
moment I'll define this:


local dummyreporter = function(c)
return function(...)
(texio.reporter or texio.write_nl)(c ..  :  .. 
string.formatters(...))

end
end

so, you can define texio.reporter which is not defined by default.

(The namespaces are somewhat protected so i cannot oversee now what 
messing with logs will bring in terms of side effects.)


Hans

-
  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 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
___

Re: [NTG-context] [luatex-fonts] +mkmk; +mark results in call to undefined onetimemessage()

2013-05-12 Thread Philipp Gesang
···date: 2013-05-12, Sunday···from: Hans Hagen···

 On 5/12/2013 9:19 PM, Philipp Gesang wrote:
 Hi,
 
 in luatex-plain, the example below
 
  \font\grk=file:LinLibertine_R.otf:+mark;+mkmk;mode=node at 14.4pt
  {\grk
   μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος\hfill\break
   οὐλομένην, ἣ μυρί' Ἀχαιοῖς ἄλγε' ἔθηκε}
  \bye
 
 triggers a call to onetimemessage() which is nil at the time when
 the upvalue is created. Can we have calls to
 fonts.loggers.onetimemessage() instead, so we can override that
 one with our own logger?
 
 hm, don't assume that all that logging will be exposed forever in a
 generic way; a lot is for specific tracing only and i more or less
 assume that for problematic issues one will use context as benchmark
 anyway (in fact, I've even been thinking of a stripped down generic
 variant i.e. no unneccessary more context and dev related overhead
 (leaner and meaner) which is possible once we're stable.

Sounds good. As most of the tracing code follows a clear pattern
it might even be possible to recognize and drop it during the
merge.

 So it's more convenient if I just uncommented the trace-bugs
 
 elseif trace_bugs then
 
 which means that the message will not be called outside context at all.

Fine with me.

 On a related note, we would like to reduce verbosity. In
 luatex-basics-gen.lua, could we have:
 
 logs = logs or {
new=dummyreporter,
reporter=dummyreporter,
messenger=dummyreporter,
report=dummyfunction,
 }
 
 So we can provide our own “logs” table?
 
 That needs thinking, as i cannot guarantee that logging will stay
 the same for those modules; a wrapper might be more stable, so for
 the moment I'll define this:
 
 local dummyreporter = function(c)
 return function(...)
 (texio.reporter or texio.write_nl)(c ..  :  ..  
 string.formatters(...))
 end
 end
 
 so, you can define texio.reporter which is not defined by default.

Fine with me.

 (The namespaces are somewhat protected so i cannot oversee now what
 messing with logs will bring in terms of side effects.)

Absolutely.

Thanks a lot
Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpOC5d_kDFGf.pgp
Description: PGP signature
___
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
___