SetOptions
✖
SetOptions
sets options associated with an external object such as a NotebookObject or CloudObject.
Details

- SetOptions is equivalent to an assignment that redefines certain elements of the list Options[s] of default options.
- SetOptions can be used on Protected symbols that do not also have the Locked attribute.
- SetOptions returns the new form of Options[s].
- You can use SetOptions on InputStream and OutputStream objects. If there is only one stream with a particular name, you can give the name as a string as the argument of Options.
- SetOptions can be used on a list of streams, such as the value of $Output.
- If object refers to a front end object such as $FrontEnd, NotebookObject, or CellObject, the kernel will send a request to the front end that will immediately make the change specified.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (4)Survey of the scope of standard use cases
Reset the default precision for HilbertMatrix:

https://wolfram.com/xid/0bdouaq2r-c2kid4

Now HilbertMatrix uses machine numbers by default:

https://wolfram.com/xid/0bdouaq2r-84a2r

A specific option setting overrides the new default:

https://wolfram.com/xid/0bdouaq2r-gph535


https://wolfram.com/xid/0bdouaq2r-htxpe4
Start writing to a temporary file:

https://wolfram.com/xid/0bdouaq2r-dxexpb

Set the page width to 10 characters:

https://wolfram.com/xid/0bdouaq2r-dj4gez

Write Range[10] to the file and close the stream:

https://wolfram.com/xid/0bdouaq2r-fl70w9

Line breaks occur at the 10th column:

https://wolfram.com/xid/0bdouaq2r-banj0f
Create a reference to the input cell:

https://wolfram.com/xid/0bdouaq2r-px3wqw

Change the background of the cell to red:

https://wolfram.com/xid/0bdouaq2r-8mm85z
Restore the setting of the cell, which will cause it to inherit from the notebook:

https://wolfram.com/xid/0bdouaq2r-1dge07
Change the Permissions of a CloudObject:

https://wolfram.com/xid/0bdouaq2r-jaba9o


https://wolfram.com/xid/0bdouaq2r-glx3r2

Properties & Relations (2)Properties of the function, and connections to other functions
SetOptions can be used to modify protected symbols:

https://wolfram.com/xid/0bdouaq2r-81u848

https://wolfram.com/xid/0bdouaq2r-hoo45t

The symbol still has attribute Protected:

https://wolfram.com/xid/0bdouaq2r-5jelas


https://wolfram.com/xid/0bdouaq2r-l1sf98
SetOptions resets the Permissions value entirely (except for the owner's permissions):

https://wolfram.com/xid/0bdouaq2r-fi68yt


https://wolfram.com/xid/0bdouaq2r-cq2frc


https://wolfram.com/xid/0bdouaq2r-s5bm0k


https://wolfram.com/xid/0bdouaq2r-lqk7hu

SetPermissions only resets the capabilities of the given user groups:

https://wolfram.com/xid/0bdouaq2r-e7kctx


https://wolfram.com/xid/0bdouaq2r-okofz8

Possible Issues (2)Common pitfalls and unexpected behavior
SetOptions can only be used to change the default value of an option, not to add a new one:

https://wolfram.com/xid/0bdouaq2r-zv5jjj


https://wolfram.com/xid/0bdouaq2r-elbf3s


Use AppendTo, PrependTo and similar functions to add additional options to a function:

https://wolfram.com/xid/0bdouaq2r-eg5j6v

For notebook options with rules, it can be awkward to make a targeted change to a specific rule:

https://wolfram.com/xid/0bdouaq2r-gbdj4q
CurrentValue provides a better way of adding or changing specific rules:

https://wolfram.com/xid/0bdouaq2r-m67j5b

Wolfram Research (1988), SetOptions, Wolfram Language function, https://reference.wolfram.com/language/ref/SetOptions.html (updated 2012).
Text
Wolfram Research (1988), SetOptions, Wolfram Language function, https://reference.wolfram.com/language/ref/SetOptions.html (updated 2012).
Wolfram Research (1988), SetOptions, Wolfram Language function, https://reference.wolfram.com/language/ref/SetOptions.html (updated 2012).
CMS
Wolfram Language. 1988. "SetOptions." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/SetOptions.html.
Wolfram Language. 1988. "SetOptions." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/SetOptions.html.
APA
Wolfram Language. (1988). SetOptions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetOptions.html
Wolfram Language. (1988). SetOptions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetOptions.html
BibTeX
@misc{reference.wolfram_2025_setoptions, author="Wolfram Research", title="{SetOptions}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/SetOptions.html}", note=[Accessed: 25-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_setoptions, organization={Wolfram Research}, title={SetOptions}, year={2012}, url={https://reference.wolfram.com/language/ref/SetOptions.html}, note=[Accessed: 25-March-2025
]}