Skip to content
Prev 55710 / 63421 Next

"utils::file.edit" does not understand "editor" with additional arguments

We do not have the 'at a minimum' information requested by the posting 
guide, and I cannot reproduce anything like this on a Unix-alike.  Both 
file.edit and edit.default call the same underlying C code, and that 
single-quotes the 'editor' argument to allow for spaces in its path/name 
so I would not expect this to work.

Two workarounds:

1) Set an alias in your shell (e.g. in .bashrc) for 'subl -n'.  This is 
something widely needed on macOS where many editors are invoked by 'open 
-a', and I also use it for 'emacsclient -n'.

2) Make use of the ability to specify editor as an R function, invoking 
the external program by system2() etc.
On 28/08/2018 20:07, Randy Lai wrote: