Arbortext Command Language > Functions by Alphabetical Listing > write_preferences
  
write_preferences
write_preferences (path[, doc])
This function writes the current session scope values for all the preference items to the preferences file specified by path without updating the current window display. If no path is supplied, then the preferences are written to the file Arbortext Editor looks for when reading preferences.
If a document identifier is supplied in the optional doc parameter, the function will write the current local scope (window, document, and view) values to the preferences file specified by path. In this case, the function will set the session values as well. A document identifier of -1 writes the current session scope values to the preferences file. If document identifier is omitted, then the function writes the preference scope values to the preferences file.
If the function executes successfully, it returns a one (1). If the path is invalid, the function returns a zero (0).
Examples
write_preferences("~/arbortextuser/.arbortext.wcf")
write_preferences("C:\\arbortextuser\\arbortext.wcf",-1)
In Windows, a double-quoted string uses a backslash to denote an escape sequence, so you need to supply two backslashes to represent the path separator.
Related Topics
Set option scope
current_doc function
option_scope function
set command