[ESS] customizing ESS for start and quit: suppressing start and stop messages like "starting directory|save workspace image"

Martin Maechler maechler at stat.math.ethz.ch
Fri Nov 17 11:47:42 CET 2006


Thanks a lot, Frede, 
for your "community help"!

I have one remark (below).

>>>>> "Frede" == Frede Aakmann Tøgersen <FredeA.Togersen at agrsci.dk>
>>>>>     on Fri, 17 Nov 2006 09:02:32 +0100 writes:

 [..........]
 
    >> -----Oprindelig meddelelse-----
    >> Fra: 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

 [..........]

    >> 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?

    Frede> Well, in an R buffer, why not type C-h v
    Frede> inferior-ess-exit-command <ENTER> to get this in
    Frede> another buffer:

    Frede> inferior-ess-exit-command is a variable defined in `ess-cust.el'.
    Frede> Its value is "q()\n"
    Frede> Local in buffer *R*; global value is "q()\n"
    Frede> Automatically becomes buffer-local when set in any fashion.

    Frede> Documentation:
    Frede> Format-string for building the ess command to exit.

    Frede> This format string should use %s to substitute an object name.

    Frede> You can customize this variable.

    Frede> [back]

    Frede> Now customize this variable to be q('no') and you are done.

An alternative way, which I slightly prefer is to 
customize  inferior-R-args  by adding "--no-save" to it.

[hackerishly: add the following line at the proper place
	      namely inside " (custom-set-variables .. ) "
 to your ~/.emacs file :

 '(inferior-R-args "--no-save ")

]

The slight advantage of this approach is that ``R can now'' that
this is set, e.g.,  via  commandsArgs()

Note, Patrick that you possibly also want to add
"--no-restore-history" or even "--no-restore" to that list of R 
command line arguments.

Martin Maechler, ETH Zurich




More information about the ESS-help mailing list