ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* What does --errors and --noconsole do?
@ 2020-11-04 14:53 Sylvain Hubert
  2020-11-04 15:15 ` Sylvain Hubert
  2020-11-04 16:13 ` Wolfgang Schuster
  0 siblings, 2 replies; 7+ messages in thread
From: Sylvain Hubert @ 2020-11-04 14:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear List,

I was reading workflow-mkiv
<http://www.pragma-ade.nl/general/manuals/workflows-mkiv.pdf> 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

[-- Attachment #1.2: Type: text/html, Size: 1278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: What does --errors and --noconsole do?
  2020-11-04 14:53 What does --errors and --noconsole do? Sylvain Hubert
@ 2020-11-04 15:15 ` Sylvain Hubert
  2020-11-04 20:32   ` Wolfgang Schuster
  2020-11-04 16:13 ` Wolfgang Schuster
  1 sibling, 1 reply; 7+ messages in thread
From: Sylvain Hubert @ 2020-11-04 15:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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 <champignoom@gmail.com> wrote:

> Dear List,
>
> I was reading workflow-mkiv
> <http://www.pragma-ade.nl/general/manuals/workflows-mkiv.pdf> 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
>

[-- Attachment #1.2: Type: text/html, Size: 1793 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: What does --errors and --noconsole do?
  2020-11-04 14:53 What does --errors and --noconsole do? Sylvain Hubert
  2020-11-04 15:15 ` Sylvain Hubert
@ 2020-11-04 16:13 ` Wolfgang Schuster
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2020-11-04 16:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Sylvain Hubert schrieb am 04.11.2020 um 15:53:
> Dear List,
>
> I was reading workflow-mkiv 
> <http://www.pragma-ade.nl/general/manuals/workflows-mkiv.pdf> 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


[-- Attachment #1.2: Type: text/html, Size: 1608 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: What does --errors and --noconsole do?
  2020-11-04 15:15 ` Sylvain Hubert
@ 2020-11-04 20:32   ` Wolfgang Schuster
  2020-11-04 21:10     ` Sylvain Hubert
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2020-11-04 20:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* Re: What does --errors and --noconsole do?
  2020-11-04 20:32   ` Wolfgang Schuster
@ 2020-11-04 21:10     ` Sylvain Hubert
  2020-11-04 21:22       ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Sylvain Hubert @ 2020-11-04 21:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Wed, 4 Nov 2020 at 21:32, Wolfgang Schuster <
wolfgang.schuster.lists@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

[-- Attachment #1.2: Type: text/html, Size: 686 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: What does --errors and --noconsole do?
  2020-11-04 21:10     ` Sylvain Hubert
@ 2020-11-04 21:22       ` Wolfgang Schuster
  2020-11-04 22:21         ` Sylvain Hubert
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2020-11-04 21:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Sylvain Hubert schrieb am 04.11.2020 um 22:10:
> On Wed, 4 Nov 2020 at 21:32, Wolfgang Schuster 
> <wolfgang.schuster.lists@gmail.com 
> <mailto:wolfgang.schuster.lists@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.

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{10000}{\getcheckedparameters[test][xx][a=b,c= d, e = f]}

\enablecheckparameters

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

\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1536 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: What does --errors and --noconsole do?
  2020-11-04 21:22       ` Wolfgang Schuster
@ 2020-11-04 22:21         ` Sylvain Hubert
  0 siblings, 0 replies; 7+ messages in thread
From: Sylvain Hubert @ 2020-11-04 22:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Wed, 4 Nov 2020 at 22:22, Wolfgang Schuster <
wolfgang.schuster.lists@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{10000}{\getcheckedparameters[test][xx][a=b,c= d, e = f]}
> \enablecheckparameters
> \testfeatureonce{10000}{\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.

[-- Attachment #1.2: Type: text/html, Size: 1022 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-11-04 22:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 14:53 What does --errors and --noconsole do? Sylvain Hubert
2020-11-04 15:15 ` Sylvain Hubert
2020-11-04 20:32   ` Wolfgang Schuster
2020-11-04 21:10     ` Sylvain Hubert
2020-11-04 21:22       ` Wolfgang Schuster
2020-11-04 22:21         ` Sylvain Hubert
2020-11-04 16:13 ` Wolfgang Schuster

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