UndoOptions

UndoOptions

is an option for Style that specifies settings for controlling the behavior of the front end's interactive undo/redo system.

Details

  • The typical usage is UndoOptions->{opt1->val1,opt2->val2,}.
  • The following suboptions may be specified:
  • "Enabled"Automaticwhether undo is enabled and recording events
    "MaxLength"Infinitymaximum number of events that can be stored in the undo system
    "MemoryLimit"107number of bytes that the system can use before it tries to spool undo history to the file system
    "RememberEvaluations"Truewhether to store the results of evaluations in the undo stack
  • The front end keeps multiple undo stacks. For example, each notebook may have its own undo stack, and some notebook contents, such as InputField, have independent undo stacks. Each undo stack is controlled by the options associated with the object it is attached to.
  • "Enabled"->Automatic will use options such as Deployed and Editable to determine whether undo should be enabled or not. This may work differently on different objects. For example, a notebook with Deployed->True will have its undo stack disabled, while an InputField will be enabled regardless of its Deployed setting.
  • "MaxLength" controls the number of times you can use the Undo menu command. Sequences of actions that are aggregated into a single use of the Undo menu command count as one item for the purpose of this option.
  • An undo stack may temporarily exceed the limit set by "MemoryLimit". When it does, the front end will attempt to reduce memory usage by spooling undo actions to the file system. If such spooling is disabled, then the undo stack is trimmed to fit within memory.
  • "RememberEvaluations"->False will continue to track actions triggered by evaluations from controls such as Button and ActionMenu.
  • "SpoolDirectory" determines where on the file system undo actions are serialized. "SpoolDirectory"->None disables spooling of undo actions.
  • While spooling of the undo stack is a useful way to preserve large undo stacks without excessive memory usage, it has some drawbacks. The spooling may slow down the system when working with extremely large outputs. The undo stack is spooled in clear text, which might be a security risk if the file system is not secured.

Examples

Basic Examples  (1)

Determine whether the evaluation notebook supports undo:

Wolfram Research (2014), UndoOptions, Wolfram Language function, https://reference.wolfram.com/language/ref/UndoOptions.html.

Text

Wolfram Research (2014), UndoOptions, Wolfram Language function, https://reference.wolfram.com/language/ref/UndoOptions.html.

CMS

Wolfram Language. 2014. "UndoOptions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/UndoOptions.html.

APA

Wolfram Language. (2014). UndoOptions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UndoOptions.html

BibTeX

@misc{reference.wolfram_2024_undooptions, author="Wolfram Research", title="{UndoOptions}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/UndoOptions.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_undooptions, organization={Wolfram Research}, title={UndoOptions}, year={2014}, url={https://reference.wolfram.com/language/ref/UndoOptions.html}, note=[Accessed: 21-November-2024 ]}