r/Mathematica • • Jul 10 '14

Multiple undo in Mathematica 10!

28 Upvotes

16 comments sorted by

8

u/shizzy0 Jul 11 '14

Finally! Jesus Christ. I can't believe commercial software can get away with that for so long. Undo?! Have you heard of it?

9

u/sidneyc Jul 11 '14

I think you underestimate the complexity of this feature in a system that has client/server (or frontend/kernel, if you will) separation.

I would be surprised if it actually worked well for anything non-trivial.

What if you do:

x=4
Remove[x]

What would the status of x be after even a single undo (so, undoing the Remove[])?

How does this interact with dynamic evaluation?

4

u/dirtlamb5 Jul 11 '14

Just checked, x is still not recognized after undoing the Remove[x]. Same with Clear[x].

3

u/shizzy0 Jul 11 '14

You bring up a good point, but honestly I didn't expect them to actually undo the kernel state. Them just having the editor undo-able would be fine.

1

u/sidneyc Jul 11 '14

Except that if you just unroll in the frontend, there will be visual inconsistencies between the frontend and kernel states.

2

u/dirtpirate Jul 13 '14

Using the front end independent of what undo capabilities are present will lead to visual inconsistencies. I can write and evaluate x=2, then edit it to say x=4, and continue carrying out computations with x still having the value 2.

It's true that a undo system that can reliably maintain a 1to1 relation between all input notebooks and current kernel state is a major thing to implement, but that's neither what has been needed nor what has been requested, and not what has been made. The multilevel undo feature they've implemented now could and should have been here at least 15 years ago.

1

u/sidneyc Jul 13 '14

I've toyed around with v10 for a bit, and it does appear to be a frontend-only feature. I agree that this could have been implement way earlier.

4

u/Yurell Jul 11 '14

This will be the best thing about Mathematica 10 for me. I don't care what else they shoved under the bonnet, multiple undo is long overdue.

2

u/[deleted] Jul 11 '14

Finally

2

u/nakilon Jul 11 '14

It had multiple Undo -- you just had to turn it on manually.

2

u/[deleted] Jul 11 '14

"Manually," like writing everything down on paper as you type?

2

u/dirtpirate Jul 13 '14

I had "multiple undo" through version management. It's like trimming your potted plants with a chainsaw, but it worked quite well. Now with multiple undo my code editing will be sped up, but I'll still be using version management to keep track of projects.

1

u/shizzy0 Jul 11 '14

How? Do tell.

2

u/nakilon Jul 11 '14

Seems like I lied, sorry (

0

u/[deleted] Jul 11 '14

[deleted]

1

u/[deleted] Jul 11 '14

Wait for the associative arrays.