persist_process_presets: Write current process presets out to a .Rprofile
Description
Syncs the in-session add_process_preset() registry out to a
.Rprofile file, so it's available again in future sessions. This is
what persist = TRUE on add_process_preset()/remove_process_preset()/
amend_process_preset() calls internally; call it directly to persist
several in-session changes (each made with persist = FALSE) in one
write/confirmation instead of one per change. See the CRAN-policy notes
in add_process_preset() -- in particular, this always errors instead
of writing anything when rlang::is_interactive() is FALSE.
TRUE if the file was written, FALSE if declined (invisibly)
Arguments
ask
<logical(1)> When persist = TRUE, ask for interactive
confirmation before writing? (default: TRUE; only ever consulted when
rlang::is_interactive() is already TRUE)
profile
<character(1)> Where to persist to when
persist = TRUE: "project" (default, .Rprofile in getwd()),
"user" (the user-level profile), or a literal file path.