MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: UNDO and Mathematica - how useless is it?

  • To: mathgroup at
  • Subject: [mg98076] Re: UNDO and Mathematica - how useless is it?
  • From: Jens <noeckel at>
  • Date: Sun, 29 Mar 2009 02:47:39 -0500 (EST)
  • References: <> <23582715.1238067049865.JavaMail.root@m02>

On Mar 28, 3:41 am, Bob F <deepyog... at> wrote:
> On Mar 27, 4:33 am, "David Park" <djmp... at> wrote:
> > I think that some, at least, of the important WRI developers do take noti=
> ce
> > of what is on MathGroup. So give detail and make a good case and I think
> > they will consider it. They may not necessarily do it because it may be
> > difficult, but there are a number of changes I've seen that did appear to
> > come from MathGroup complaints and suggestions.
> > David Park
> > djmp... at comcast.net
> I agree that the definition of what UNDO means can be problematic with
> Mathematica, but if you talk about only the editing of the notebook
> itself with regard to UNDO, then it becomes much easier, doesn't it?.
> If we only talk about the editing changes of a notebook wouldn't the
> UNDO be trivial to implement?
> For any sort of calculations just put in different data and re-execute
> the notebook or cell.
> Part of each cell definition is a timestamp (look at the low-level
> code by doing a Cell/Show Expression if you want to see). With this
> information and some sort of keyboard input data structure going back
> in time any number of levels would be just a question of undoing that
> level of keyboard input and go back to the previous version of the
> text wouldn't it, then a simple re-execution of the cell gets you back
> where you were?
> It seems that because the problem is difficult to provide a "perfect"
> solution, the currently worthless solution is any better?
> What would be bad about providing an UNDO that only worked on the
> state of the text that forms the notebook or cell? That way any change
> could be undone, and if needed then a simple re-execution of the cell/
> notebook would get the old calculation back. Yes, I realize what about
> if the calculation took 4 days to complete, you surely dont want to
> undo that if the result is truly valid, but perhaps a cell could be
> marked as "Don't Change with UNDO" or something like that (just like
> you can mark it as visible or editable or ???) Would this give people
> all the ability of a multi-level undo without the possibility of
> loosing valuable calculations??
> Would someone at Wolfram PLEASE comment about the state of the UNDO
> debate and what is and isn't possible and what the various problems
> with certain solutions are???
> -BOB

A useful undo function is extremely helpful in bringing down the
barrier for novices, because they will feel free to experiment without
fear of breaking things.

Maybe the following would be doable in Mathematica: for each
_individual_ Input cell, keep track of a certain number of undo steps.
The undo history could be reachable through some right-click menu
bound to the individual cell bracket. Of course that's a lot of
separate undo histories to keep track of, but one could limit the
depth and provide a way to clear the history.

The reason I'm proposing undo for individual Input cells is that these
cells can then be rearranged arbitrarily, and there would be less
potential for conflict with interactive output. Of course,
NotebookWrite and other notebook manipulation features are a big
stumbling block (for undo... otherwise they're great). Maybe one would
have to restrict the cell history changes made by textual editing.

A less ambitious proposal would be to at least implement a full undo
history counting from the time a user first starts editing an input
cell. In a large cell where I want to edit several places, even this
modest undo would give me some peace of mind (OK, I've learned to live
without undo by making backup copies of cells and notebooks, but it
would be hard to deny that frustration with non-undoable typos is a
constant feature of Mathematica).


  • Prev by Date: Re: Using a variable set elsewhere within a function that has attribute
  • Next by Date: Re: Option instead of a function argument: is it possible?
  • Previous by thread: RE: Re: UNDO and Mathematica - how useless is it?
  • Next by thread: Re: UNDO and Mathematica - how useless is it?