[ESS] customizing ESS for start and quit: suppressing start and stop messages like "starting directory|save workspace image"
patrick at pdrechsler.de
Sat Nov 18 12:35:44 CET 2006
Frede Aakmann Tøgersen wrote:
>> -----Oprindelig meddelelse-----
>> Fra: ess-help-bounces at stat.math.ethz.ch
>> [mailto:ess-help-bounces at stat.math.ethz.ch] På vegne af
>> Patrick Drechsler
>> Sendt: 16. november 2006 23:46
>> Til: ess-help at stat.math.ethz.ch
>> Emne: [ESS] customizing ESS for start and quit: suppressing
>> start and stop messages like "starting directory|save workspace image"
>> Every time I open R with "emacs -f R" I would like to answer
>> "yes" to the first question:
>> starting directory?
> 3.5 Changing the startup actions
> If you do not wish ESS to prompt for a starting directory when starting
> a new process, set the variable `ess-ask-for-ess-directory' to `nil'.
> In this case, the starting directory will be set using one of the
> following methods:
> 1. If the variable `ess-directory-function' stores the name of a
> function, the value returned by this function is used. The
> default for this variable is nil.
> 2. Otherwise, if the variable `ess-directory' stores the name of a
> directory (ending in a slash), this value is used. The default
> for this variable is nil.
> 3. Otherwise, the working directory of the current buffer is used.
> If `ess-ask-for-ess-directory' has a non-`nil' value (as it does by
> default) then the value determined by the above rules provides the
> default when prompting for the starting directory. Incidentally,
> `ess-directory' is an ideal variable to set in `ess-pre-run-hook'.
Works as documented, thanks for the pointer!
>> Every time I exit R from emacs (`C-c C-q') I get asked if
>> > Save workspace image? [y/n/c]:
>> I always answer "no".
>> Is there any easy way to customize this?
> Well, in an R buffer, why not type C-h v inferior-ess-exit-command <ENTER> to get this in another buffer:
> inferior-ess-exit-command is a variable defined in `ess-cust.el'.
> Its value is "q()\n"
> Local in buffer *R*; global value is "q()\n"
> Automatically becomes buffer-local when set in any fashion.
> Format-string for building the ess command to exit.
> This format string should use %s to substitute an object name.
> You can customize this variable.
> Now customize this variable to be q('no') and you are done.
Dito, thanks again for your help Frede!
More information about the ESS-help