ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [luatex-fonts] +mkmk; +mark results in call to undefined onetimemessage()
@ 2013-05-12 19:19 Philipp Gesang
  2013-05-12 20:05 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Gesang @ 2013-05-12 19:19 UTC (permalink / raw)
  To: ConTeXt ML


[-- Attachment #1.1.1: Type: text/plain, Size: 812 bytes --]

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?

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?

Thanks
Philipp



[-- Attachment #1.1.2: isolated.tex --]
[-- Type: application/x-tex, Size: 242 bytes --]

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [luatex-fonts] +mkmk; +mark results in call to undefined onetimemessage()
  2013-05-12 19:19 [luatex-fonts] +mkmk; +mark results in call to undefined onetimemessage() Philipp Gesang
@ 2013-05-12 20:05 ` Hans Hagen
  2013-05-12 20:24   ` Philipp Gesang
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2013-05-12 20:05 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [luatex-fonts] +mkmk; +mark results in call to undefined onetimemessage()
  2013-05-12 20:05 ` Hans Hagen
@ 2013-05-12 20:24   ` Philipp Gesang
  0 siblings, 0 replies; 3+ messages in thread
From: Philipp Gesang @ 2013-05-12 20:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2474 bytes --]

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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-12 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-12 19:19 [luatex-fonts] +mkmk; +mark results in call to undefined onetimemessage() Philipp Gesang
2013-05-12 20:05 ` Hans Hagen
2013-05-12 20:24   ` Philipp Gesang

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).