3
$\begingroup$

Here's an example:

CurrentValue[
    $FrontEndSession, {TaggingRules, "a", "a1"}
] = 22;

CurrentValue[
    EvaluationNotebook[], TaggingRules
] = {"a" -> {"a1" -> 1, "a2" -> 2}, "b" -> 5}


CurrentValue[EvaluationNotebook[], {TaggingRules, "a", "a1"}]
   (* 1  - ok*)

CurrentValue[
   EvaluationNotebook[], {TaggingRules, "a", "a1"}
] = Inherited

CurrentValue[EvaluationNotebook[], TaggingRules]
{"b" -> 5}

So whole "a" TaggingRules were dropped.

One could say that maybe it doesn't work with nested rules but will work on the first level of TaggingRules. Well, it does not, "a" -> 1 set to Inherited will be dropped despite $FrontEndSession tagging rules:

CurrentValue[EvaluationNotebook[], TaggingRules] = {"a" -> 1, "b" -> 5};
CurrentValue[EvaluationNotebook[], TaggingRules]
    (*{"a" -> 1, "b" -> 5}*)
CurrentValue[$FrontEndSession, {TaggingRules, "a"}] = 22;
CurrentValue[EvaluationNotebook[], {TaggingRules, "a"}] = Inherited;
CurrentValue[EvaluationNotebook[], TaggingRules]
    (*{"b" -> 5}*)

Am I missing something? How to make it work?

Maybe related: Notebook's TaggingRules inherit too much

CASE:3893084

$\endgroup$
  • $\begingroup$ Are you using the new Version 11.1.1, that has all the bug fixes? $\endgroup$ – gwr Apr 26 '17 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.