[ESS] Feature request -- start R automagically
Martin Maechler
maechler at stat.math.ethz.ch
Sat May 24 13:56:51 CEST 2008
>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Sat, 24 May 2008 10:53:09 +0200 writes:
MM> Salut Vincent, (et al)
>>>>> "VG" == Vincent Goulet <vincent.goulet at act.ulaval.ca>
>>>>> on Fri, 23 May 2008 09:03:41 -0400 writes:
VG> Hi Martin, Le ven. 23 mai à 02:45, Martin Maechler a
VG> écrit :
>>>>>>>> "MM" == Martin Maechler
>>>>>>>> <maechler at stat.math.ethz.ch> on Fri, 9 May 2008
>>>>>>>> 17:35:56 +0200 writes:
>>>
>>>>>>>> "MR" == Mathieu Ribatet <mathieu.ribatet at epfl.ch>
>>>>>>>> on Thu, 08 May 2008 17:37:32 +0200 writes:
>>>
MR> Dear list, Will it be possible to add the following
MR> request. When running emacs with a R script file (or
MR> any other source
>>> file) and
MR> trying to C-c C-r a region while no R process is
MR> running, you
>>> get the
MR> following message "Process R is not running".
>>>
MR> I think it may be convenient if then ESS propose you to
>>> launch a new R
MR> process.
>>>
MM> I agree, and I had added this feature already a few
MM> months ago in a different context (Sweave editing) on
MM> 2007-05-03 { according to lisp/Changelog }.
>>>
MM> I hope to find time to hack this during the prolonged
>>> Pentecoste
MM> weekend.
>>>
>>> and I did not have time then, but last night.
>>>
>>> I've commited a change to ESS' development version which
>>> automatically starts R if - you are editing an S
>>> language buffer [ ess-language is "S" ] which should be
>>> the case for all R source files - if your buffer has no
>>> associated ess process.
VG> Shouldn't it be "if there is no *running* ess process" ?
MM> well, that's yet another feature request ! :-) which
MM> makes sense, but is not yet implemented.
MM> I'll see if I can implement it "quickly". Martin
It was not quickly,
and I don't quite like the result yet,
but seem not to be able to get it working the way I want
(at least not without resorting to horrible hacks).
The current (after you get ESS [ r3905 ]
from https://svn.r-project.org/ESS/trunk/ )
problem is the following:
Assume an emacs session (in 1 frame) with 2 buffers:
Top buffer : foobar.R
Bottom buffer: *R* where you have executed C-c C-q or q("no")
Now in foobar.R, send a line (C-c C-n) to *R*
this now restarts R quite nicely,
*BUT* I end up with
- the two buffers are reversed :
*R* is now top, foobar.R is bottom
- Point ("the cursor" / focus) is in the *R* buffer instead of
in foobar.R at the location where I had sent my line.
This happens inspite of (save-excursion ..) used in many places.
If any good Emacs lisp programmers see a solution...
Martin
>>>
>>> Consequently, this feature will be in ESS 5.3.8
>>>
>>> Martin Maechler, ETH Zurich
More information about the ESS-help
mailing list