Are there any new tools in v10 that might be applicable to this problem?
Recent versions of Mathematica provide the option of having a unique $Context for each cell group, via:
- Evaluation > Notebook's Default Context > Unique to Each Cell Group
This is an appealing concept, but I find it unusable, as my code spans multiple cell groups.
I would like a way to specify a unique context for cell groups of a certain level such as every Section, but not a separate context for every Subsection or Subsubsection.
A solution will need to affect new cell groups as they are created.
Sectionblocks. I don't want symbol collisions so I typically manuallyQuit[]when moving between sections, but it would be far more convenient if these sections were context isolated. Each section block may have a number ofSubsectionorSubsubsectioncells that I do need to share symbols between. – Mr.Wizard Jan 20 '12 at 13:30SectionandInputcells with nothing in between them, so it seemed to work. I'll have to work on this a bit. – rcollyer Jan 20 '12 at 17:32CellContextwill only update at best to the nearest enclosing group. So, I wonder ifCellPrologcould be used to reset it. But, it would set every time the cell is executed, so maybe not the best option. Personally, I'd like to use the enclosing cells for pre and post code, myself. I think it could be very useful, in general. – rcollyer Jan 20 '12 at 17:47CellContext->Inheritedon the child cell while settingCellContext->"Test"` on the parent, and it, also, did not work. :( – rcollyer Jun 07 '12 at 17:08