Re: "Freezing" evaluation Output?

*To*: mathgroup at smc.vnet.net*Subject*: [mg68865] Re: "Freezing" evaluation Output?*From*: albert <awnl at arcor.de>*Date*: Mon, 21 Aug 2006 06:33:20 -0400 (EDT)*References*: <ecbot8$rc2$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

AES wrote: > [I hope people will pardon the ongoing barrage of perhaps absurd > questions I keep posting; the answers are appreciated, and sometimes > even useful.] > > Is there any simple programmable way to "freeze" the Output from the > evaluation of an Input cell, so that subsequent reevaluation of the > Input cell doesn't end by erasing the previous output? > > E.g., I evaluate a plotting routine that takes a long time to do all its > calculations, and I want to be sure I keep the resulting graphic around > until I'm ready to delete it. > > I appreciate there are simple ways to do this "manually": > > 1) Insert (by hand) a dummy text cell between the Input and Output > cells. > > 2) Export the Output to somewhere else, with a file name that contains > an execution-time-dependent string. > > 3) Other similar approaches requiring "operator intervention". > > But is there an execution (or output) option for Input cells (or for > individual commands) that says, "Don't replace previous output, even if > it's still there"? It is the Cell-Option CellAutoOverwrite which controles whether a cell is replaced or not. You can test that with: CellPrint[Cell["test","Output",CellAutoOverwrite->False]] which should behave as you suggested. CellAutoOverwrite is usually set to True for Output, Message, Print and Graphics cells in the common stylesheets, I think. If you want to not overwrite e.g. Graphics-Cells you could change CellAutoOverwrite to False for Graphics-Cells in the StyleSheet you are using. Since this is most probably something that you don't want globally, you might need some extra work and write special routines that generate the Cells you want to output, put CellAutoOverwrite to False for them and write them to your notebook with CellPrint. You might need to learn about functions like MakeBoxes and DisplayString to generate Cells containing formatted expressions, graphics, etc. Maybe there are simpler ways to achieve this, but these I don't know.... hth, albert