* [NTG-context] Re: success and a query
[not found] <5c612355-9ea8-4ff9-a2ec-754245ea3219@gmail.com>
@ 2025-07-05 6:28 ` Henning Hraban Ramm
[not found] ` <23c06c2a-8af2-4fbe-8a4e-b50626c26571@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Henning Hraban Ramm @ 2025-07-05 6:28 UTC (permalink / raw)
To: ntg-context
Am 05.07.25 um 00:36 schrieb jbf:
> There is a new warning in the log file that I have not seen before
> (nothing to do with the above). Could someone explain its significance
> to me? I assume I don't really need to bother about it but I'd like to
> understand it.
>
> csname overload > warning, protection level 3, control sequence
> 'newcontextversion', properties 'permanent protected', file '/home/
> julian/data/context/tex/texmf-context/tex/context/base/mkxl/cont-
> new.mkxl', line 16
It means that Hans activated the protection of macros against
overwriting (it was an optional directive before). Probably some
internal wizardry triggers the warning…
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* [NTG-context] Re: success and a query
[not found] ` <23c06c2a-8af2-4fbe-8a4e-b50626c26571@gmail.com>
@ 2025-07-05 7:15 ` vm via ntg-context
2025-07-05 8:08 ` Hans Hagen via ntg-context
1 sibling, 0 replies; 3+ messages in thread
From: vm via ntg-context @ 2025-07-05 7:15 UTC (permalink / raw)
To: ntg-context; +Cc: vm
the line number of the warning in the log in one line off:
csname overload > warning, protection level 3, control sequence
'Important', properties 'frozen instance protected', file './context
128.tex', line 13
01 %%%% begin example
02 %\enabledirectives[overloadmode=error]
03
04 \definehighlight [Important] [style=bold]
05 \definehighlight [Unimportant] [style=italic]
06
07 \starttext
08
09 \Important {Dummy text}
10 \Unimportant{Dummy text}
11
12 \definehighlight [Important] [color=red] % <<<<<<<<<<<<<<
13
14 \pushoverloadmode
15 \definehighlight [Unimportant] [color=green]
16 \popoverloadmode
17
18 \Important {Dummy text}
19 \Unimportant{Dummy text}
20
21 \stoptext
22 %%%% end example
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* [NTG-context] Re: success and a query
[not found] ` <23c06c2a-8af2-4fbe-8a4e-b50626c26571@gmail.com>
2025-07-05 7:15 ` vm via ntg-context
@ 2025-07-05 8:08 ` Hans Hagen via ntg-context
1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2025-07-05 8:08 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 7/5/2025 8:41 AM, Wolfgang Schuster wrote:
> Am 05.07.2025 um 00:36 schrieb jbf:
>> The very latest ConTeXt update appears to have resolved any previous
>> issues I was having with color profiles. My log file now reads, as I
>> hoped it would>
>>
>> backend > profiles > profile specification 'Coated FOGRA39
>> (ISO 12647-2:2004)' loaded from '/home/julian/data/context/tex/texmf-
>> context/ colors/icc/context/colorprofiles.xml' backend >
>> profiles > setting 'CoatedFOGRA39.icc' as default 'cmyk' color space
>> backend > profiles > setting output intent to 'Coated FOGRA39
>> (ISO 12647-2:2004)' with id 'FOGRA39' for entry 1
>>
>> Thank you!
>>
>> There is a new warning in the log file that I have not seen before
>> (nothing to do with the above). Could someone explain its significance
>> to me? I assume I don't really need to bother about it but I'd like to
>> understand it.
>>
>> csname overload > warning, protection level 3, control sequence
>> 'newcontextversion', properties 'permanent protected', file '/home/
>> julian/data/context/tex/texmf-context/tex/context/base/mkxl/cont-
>> new.mkxl', line 16
>>
>> (Line 16, BTW is simply \setuplayout )
>>
>> It repeats a few times in different ways, e.g.
>>
>> csname overload > warning, protection level 3, control sequence
>> 'starttitle', properties 'frozen instance protected', file './
>> prd_Gering30-06-25.tex', line 285
>
> Context has a mechanism to report when you redefine a command and in the
> last update Hans just activated the warning mode.
>
> In the following example I create two commands at the begin of the
> document, which are redefined afterwards. The first command is reported
> in the log file while the second is because I told Context overloading
> is allowed, which can be done with \pushoverloadmode ... \popoverloadmode.
>
> When you set overloadmode to error (uncomment the first line in the
> example or use --overloadmode=error on the command line) Context stops
> and throws an error when a command is redefined.
>
> While you can ignore the mention of \newcontextversion (something Hans
> should put in overloadmode) you should take a look at the \starttitle
> warning.
ha, i never noticed because i always run error mode and set that later;
now indeed we enter warning mode asap
in core-sys.mkxl one can chaneg this:
\enforced\let\newcontextversion\gobbleoneargument
fwiw, \enforced is like \aliased (inherits all properties) but only is
permissive when used in the format file
> %%%% begin example
> %\enabledirectives[overloadmode=error]
>
> \definehighlight [Important] [style=bold]
> \definehighlight [Unimportant] [style=italic]
>
> \starttext
>
> \Important {Dummy text}
> \Unimportant{Dummy text}
>
> \definehighlight [Important] [color=red]
>
> \pushoverloadmode
> \definehighlight [Unimportant] [color=green]
> \popoverloadmode
>
> \Important {Dummy text}
> \Unimportant{Dummy text}
>
> \stoptext
> %%%% end example
For those interested: you can run
context s-system-macros.mkxl
and see what is there and how macros are classified. The top of the file
says:
%D This file is for Wolfgang and Hans and it's used in the transition
%D from \MKIV\ to the more robust \LMTX.
which tells a story. That file is actually now 5 years old so this
protection mechanism has been available for a long time already and I
always enabled it here (in error mode). It's discussed in low level
manuals but typically not something users should worry about or try to
grasp.
There are some red entries so I have to check it; not something one does
on a daily basis but you can imagine that the initial check took quite
some time and editing (adding prefixes).
A similar mechanism is available in metapost (starts at page 468 in that
file).
It fits in the luametatex / context approach of on the one hand
providing some more natural programming support (read: primitives
instead clumsy helpers or intermediate layers, a bit more readable
tex-the-language so to say) and on the other hand making sure that that
the macro package can prevent users from overloading core functionality
combined with a bit more detailed classification (thereby preventing
unwanted side effects). Of course that comes at a price (much more
testing when defining macros etc) but that is compensated with plenty
gains elsewhere.
BTW, processing that file is one of the rare cases where token memory
gets bumped (tabulates of many pages) as well as node memory (collected
table data cached before flushing). Normally when you see that something
is done wrong adn there are better ways but this is an harmless exception.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-05 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <5c612355-9ea8-4ff9-a2ec-754245ea3219@gmail.com>
2025-07-05 6:28 ` [NTG-context] Re: success and a query Henning Hraban Ramm
[not found] ` <23c06c2a-8af2-4fbe-8a4e-b50626c26571@gmail.com>
2025-07-05 7:15 ` vm via ntg-context
2025-07-05 8:08 ` Hans Hagen via ntg-context
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).