10
$\begingroup$

This question already has an answer here:

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$

marked as duplicate by Kuba, Community Dec 19 '15 at 8:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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 '15 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 '15 at 6:43
  • 1
    $\begingroup$ You could fake it: NotebookWrite[EvaluationNotebook[], Cell["ZZ", "Section", System`WholeCellGroupOpener -> True]] $\endgroup$ – Rolf Mertig Jul 22 '15 at 20:31