[ESS] customizing ESS for start and quit: suppressing start and stop messages like "starting directory|save workspace image"
Frede Aakmann Tøgersen
FredeA.Togersen at agrsci.dk
Fri Nov 17 09:02:32 CET 2006
See below for answers.
Best regards
Frede Aakmann Tøgersen
Danish Institute of Agricultural Sciences
Research Centre Foulum
Dept. of Genetics and Biotechnology
Blichers Allé 20, P.O. BOX 50
DK-8830 Tjele
Phone: +45 8999 1900
Direct: +45 8999 1878
E-mail: FredeA.Togersen at agrsci.dk
Web: http://www.agrsci.org
This email may contain information that is confidential.
Any use or publication of this email without written permission from DIAS is not allowed.
If you are not the intended recipient, please notify DIAS immediately and delete this email.
> -----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"
>
> Hello,
>
> working with ESS for a couple of years I would like variables like:
>
> suppress-start-create
>
> suppress-stop-save
>
> to put into my ~/.emacs.
>
> Or even better
>
> ess-suppress-intro-exit
>
>
> Why?
>
> I have never wanted to create or save the session logs or
> history files that R wants when creating or when closing a
> session. Obviously other people do otherwise the questions
> would not make any sense.
>
> Every time I open R with "emacs -f R" I would like to answer
> "yes" to the first question:
>
> ===============================================
> starting directory?
> ===============================================
>
>From ess-info:
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'.
> 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.
Documentation:
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.
[back]
Now customize this variable to be q('no') and you are done.
> Sorry if this is mentioned in the ESS-info files. I've used
> grep through the info files and didn't find anything
> appropriate. Maybe I have used the wrong expressions for the
> search. I've also tried the same for the archives.
> Furthermore I invoked `M-x customize-group' to see whats
> there. The regexps I have used are all in the subject. Which
> is why the subject line is a bit long (for future reference).
>
> I am currently using
>
> ESS version 5.3.3
>
> GNU Emacs 22.0.50.3 (i686-pc-linux-gnu, GTK+ Version 2.8.20) of
> 2006-10-18 on trurl
>
> Please do not hesitate to contact me if you need more info!
>
> Thankful for any pointers
>
> Patrick
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
More information about the ESS-help
mailing list