Re: [NTG-context] What does --errors and --noconsole do?

2020-11-04 Thread Sylvain Hubert
On Wed, 4 Nov 2020 at 22:22, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> There was never a real test for the performance but when you enable the
> checker in the example below (which works only with LuaTeX) the second list
> is slower.
>
> % engine=luatex
> \starttext
> \testfeatureonce{1}{\getcheckedparameters[test][xx][a=b,c= d, e = f]}
> \enablecheckparameters
> \testfeatureonce{1}{\getcheckedparameters[test][xx][a=b,c= d, e = f]}
> \stoptext
>

Indeed the checked version is almost twice as slow, and the definition of
\getchecked parameters looks confusingly intimidating to follow, so I give
up figuring out the logic here.
___
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
___


Re: [NTG-context] What does --errors and --noconsole do?

2020-11-04 Thread Wolfgang Schuster

Sylvain Hubert schrieb am 04.11.2020 um 22:10:
On Wed, 4 Nov 2020 at 21:32, Wolfgang Schuster 
> wrote:


4. it performance issues and leads to a noticeable performance drop.


This sounds a bit surprising, since intuitively it takes no less 
effort to deal with the registered key than to determine that a key is 
not registered.


There was never a real test for the performance but when you enable the 
checker in the example below (which works only with LuaTeX) the second 
list is slower.


% engine=luatex

\starttext

\testfeatureonce{1}{\getcheckedparameters[test][xx][a=b,c= d, e = f]}

\enablecheckparameters

\testfeatureonce{1}{\getcheckedparameters[test][xx][a=b,c= d, e = f]}

\stoptext

Wolfgang

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


Re: [NTG-context] What does --errors and --noconsole do?

2020-11-04 Thread Sylvain Hubert
On Wed, 4 Nov 2020 at 21:32, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> 4. it performance issues and leads to a noticeable performance drop.
>

This sounds a bit surprising, since intuitively it takes no less effort to
deal with the registered key than to determine that a key is not registered.

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


Re: [NTG-context] What does --errors and --noconsole do?

2020-11-04 Thread Wolfgang Schuster

Sylvain Hubert schrieb am 04.11.2020 um 16:15:
Moreover, is there any way to let context give an error at all when 
encountering something like `\setuppagenumbering[position=footer]` ?


ConTeXt has a function to check assignment list for valid keys but

1. The function doesn't work with the normal setup command,

2. one has to register all valid keys

3. you can't create new keys on the fly which is used in a few styles and

4. it performance issues and leads to a noticeable performance drop.

Wolfgang

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


Re: [NTG-context] What does --errors and --noconsole do?

2020-11-04 Thread Wolfgang Schuster

Sylvain Hubert schrieb am 04.11.2020 um 15:53:

Dear List,

I was reading workflow-mkiv 
 and have 
found the '--errors' and '--noconsole' arguments which seemed quite 
helpful since, according to the documentation, "show errors at the end 
of a run" and "disables logging to the console" while "error reporting 
mentioned in the previous section will never be silenced". But when I 
run 'context --errors' for the following document


\setuppagenumbering[footer]
    \starttext
    hi
    \stoptext

the message

    setup           > error in line 1, namespace 'pagenumbering', key 
'footer,'


still lies in the middle of a bunch of messages and is not shown in 
the end. When I add '--noconsole' to the arguments, the error 
disappears along with all the other messages.


--errors adds extra information to the log, try the following example 
with and without the option


\usemodule[unknown]

\starttext
\stoptext

Wolfgang

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


Re: [NTG-context] What does --errors and --noconsole do?

2020-11-04 Thread Sylvain Hubert
Moreover, is there any way to let context give an error at all when
encountering something like `\setuppagenumbering[position=footer]` ?

On Wed, 4 Nov 2020 at 15:53, Sylvain Hubert  wrote:

> Dear List,
>
> I was reading workflow-mkiv
>  and have
> found the '--errors' and '--noconsole' arguments which seemed quite helpful
> since, according to the documentation, "show errors at the end of a run"
> and "disables logging to the console" while "error reporting mentioned in
> the previous section will never be silenced". But when I run 'context
> --errors' for the following document
>
> \setuppagenumbering[footer]
> \starttext
> hi
> \stoptext
>
> the message
>
> setup   > error in line 1, namespace 'pagenumbering', key
> 'footer,'
>
> still lies in the middle of a bunch of messages and is not shown in the
> end. When I add '--noconsole' to the arguments, the error disappears along
> with all the other messages.
>
> So is there any combination of arguments that can let context only display
> what matters to the user?
>
> Thanks in advance.
>
> Best,
> Syiain
>
___
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
___