[ESS] Option to set Emacs/ESS not to ask for a new or switch to an existing inferior R process
Frede Aakmann Tøgersen
|rtog @end|ng |rom ve@t@@@com
Wed Jan 14 13:08:15 CET 2015
Hi Vitalie
Thank you for your comments.
This is what I see using the Vincent Goulet distribution of Emacs/ESS for windows platform.
Start Emacs without any initialization files:
emacs --no-init-file --no-site-file
in *scratch* buffer execute using C-M-x with cursor on following line:
(load "path/to/ess-site.el")
Then open an R script file we have (C-h v ess-local-process-name):
ess-local-process-name is a variable defined in `ess-custom.el'.
Its value is nil
Start R doing M-x R when in script buffer. Then (for some reason this seems necessary but ignore that for the moment) after doing C-s associating script buffer to the R inferior buffer we have.
ess-local-process-name is a variable defined in `ess-custom.el'.
Its value is "R"
Local in buffer script.R; global value is nil
Open another script file then we have for that buffer:
ess-local-process-name is a variable defined in `ess-custom.el'.
Its value is nil
Move the cursor past a call to an R function such that eldoc becomes activated then we have
ess-local-process-name is a variable defined in `ess-custom.el'.
Its value is "R"
Local in buffer script.R<2>; global value is nil
At this point navigating in the script.R<2> buffer does not trigger any questions about starting a new R process or using an existing R process.
Start a new R process and associate the script.R<2> buffer to the *R:2* buffer.
Open a third script file. Then we have:
ess-local-process-name is a variable defined in `ess-custom.el'.
Its value is nil
Local in buffer script.R<3>; global value is the same.
When navigating the cursor to an R function call such that eldoc is activated I see this message in the message buffer:
Process to load into: {*R:2* | *R* | *new*}
Choosing *R* we then have:
ess-local-process-name is a variable defined in `ess-custom.el'.
Its value is "R"
Local in buffer script.R<3>; global value is nil
Well I have been living with this behavior for some time now so.........
Yours sincerely / Med venlig hilsen
Frede Aakmann Tøgersen
Specialist, M.Sc., Ph.D.
Plant Performance & Modeling
Technology & Service Solutions
T +45 9730 5135
M +45 2547 6050
frtog using vestas.com
http://www.vestas.com
Company reg. name: Vestas Wind Systems A/S
This e-mail is subject to our e-mail disclaimer statement.
Please refer to www.vestas.com/legal/notice
If you have received this e-mail in error please contact the sender.
> -----Original Message-----
> From: Vitalie Spinu [mailto:spinuvit using gmail.com]
> Sent: 14. januar 2015 11:37
> To: Frede Aakmann Tøgersen
> Cc: ess-help using stat.math.ethz.ch
> Subject: Re: [ESS] Option to set Emacs/ESS not to ask for a new or switch to
> an existing inferior R process
>
> >>> Frede Aakmann Tøgersen on Wed, 14 Jan 2015 07:55:27 +0100 wrote:
>
> [...]
>
> > inferior R process then when opening a second R script file it seem
> > to be associated to this unique running R process buffer
> > automatically (found out because functions arguments is displayed in
> > minibuffer and this only happens when script file is associated to an
> > R inferior process).
>
> No. If the current buffer has no association, eldoc asks first available
> process (if any). To check if the buffer is associated with a process,
> you should consult `ess-local-process-name` variable.
>
> > However having two R script files with each having an associated R
> > inferior process then when opening a third script file I'm still
> > asked. See attached png.
>
> Asked when? ESS naturally asks that when execute the code from that
> script, but eldoc should not ask. I cannot reproduce this and I have no
> idea how that could happen unless you have some custom completion code
> that pings R process behind your back.
>
>
> Vitalie
More information about the ESS-help
mailing list