10
$\begingroup$

Why

NotebookWrite[
  EvaluationNotebook[], 
  Cell["ZZ", "Section", WholeCellGroupOpener -> True]
]

produces:

Cell["ZZ", "Section", $CellContext`WholeCellGroupOpener -> True]

While using e.g Background -> RGBColor[1, .85, .85] works fine?

Pointed by M.R. in How to sort cells?

$\endgroup$
3
  • 2
    $\begingroup$ Check Options[Cell] and try your example with all options that live in the context Gobal not System. As far as I can see, all options that are not in System will get $CellContext. $\endgroup$
    – halirutan
    Jun 17, 2015 at 1:27
  • $\begingroup$ @halirutan yep, that's what I've suspected. Unfortunately those options are not documented so I already know what WRI support will say to me... $\endgroup$
    – Kuba
    Jun 17, 2015 at 6:43
  • 1
    $\begingroup$ You could fake it: NotebookWrite[EvaluationNotebook[], Cell["ZZ", "Section", System`WholeCellGroupOpener -> True]] $\endgroup$ Jul 22, 2015 at 20:31

0

Browse other questions tagged or ask your own question.