Bug fixed
CellGrouping -> Manual isn't needed anymore for copying cell groups. They are copied correctly by default.
I'm trying to use:
NotebookWrite[nb, NotebookRead[EvaluationNotebook[]];
to copy cells from the EvaluationNotebook[]
to a new notebook nb
. For this, I move around in the EvaluationNotebook[]
using different applications of SelectionMove[nb, ...]
.
Now, I would like to copy the exact same cell groupings of the current document as well, and this doesn't seem to happen. In the newly created notebook nb
, I just see consecutive cells, without any grouping. Why is that? How can copying of groups be achieved?
CellGroupingRules
is preserved. But even withCreateDocument[NotebookRead /@ Cells[#], AbsoluteOptions[#]] &@ EvaluationNotebook[]
they are not grouped properly. What is what makes them grouped then? $\endgroup$CreateDocument[NotebookRead /@ Cells[#], AbsoluteOptions[#]] &@ EvaluationNotebook[]
with version 10.4.1 and found that all cell groups (including manually created) are preserved with the defaultCellGrouping -> Automatic
. Looks like it was a bug which is currently fixed. $\endgroup$