Quoting https://reference.wolfram.com/language/ref/CellPrint.html
Cells generated by `CellPrint` by default have `GeneratedCell->True`, so that they are overwritten if they are regenerated.
An example from https://reference.wolfram.com/language/ref/Defer.html:
CellPrint[
Function[{n},
ExpressionCell[Defer[Integrate[x^n Exp[-x], {x, 0, 1}]], "Input"]]
/@ Range[5]
]
If I put that example code in a new cell in a new notebook and excute it (shift+enter) multiple times, the ouputs are not overwritten. I expected they would be. What am I misunderstanding?
"Input"option seems to override that default. Try http://wolfram.com/xid/0j40bj4y-da8z6e and compare it to the behavior ofCellPrint[ExpressionCell[N[Pi, 20]]]. – Karsten7 Oct 16 '15 at 16:42GeneratedCell->True, CellAutoOverwrite->True. – Karsten7 Oct 16 '15 at 16:50