[ESS] ESS and R... death to Emacs...

Martin Maechler maechler at stat.math.ethz.ch
Thu Mar 16 15:07:12 CET 2006


>>>>> "Dan" == Dan Bolser <dmb at mrc-dunn.cam.ac.uk>
>>>>>     on Thu, 16 Mar 2006 12:01:45 +0000 writes:

    Dan> Martin Maechler wrote:
    >>>>>>> "Dan" == Dan Bolser <dmb at mrc-dunn.cam.ac.uk>
    >>>>>>> on Thu, 16 Mar 2006 10:26:54 +0000 writes:
    >> 
    >> 
    Dan> Hi,
    Dan> I am R Version 2.2.1  (2005-12-20 r36812)
    Dan> ESS version 5.2.12
    Dan> Linux 2.6.15-1.1833_FC4 i686 athlon i386 GNU/Linux
    >> 
    >> 
    Dan> The following R/ESS session causes a permanant 'hang', and kills my 
    Dan> emacs session...
    >> 
    Dan> # Start Emacs,
    Dan> # Start an R process (M-x R)
    Dan> # Evaluate the following line;
    Dan> par(ask=T)
    >> 
    Dan> # Evaluate the following *region*;
    Dan> plot(rnorm(50))
    Dan> plot(rnorm(50))
    >> 
    >> 
    >> 
    Dan> When the last two lines are sent *together* to the R process (via M-x 
    Dan> ess-eval-region), the session 'crashes'.
    >> 
    Dan> Anyone else got the same problem?
    >> 
    >> I see no problem (GNU emacs 21.3).

    Dan> Hmmm... I am GNU Emacs 21.4.1... not sure if that will make a diff.

no, it doesn't.  I have 21.3 on some machines and 21.4 on others.

    Dan> Can I just confirm that you did the steps *exactly* as specified 
    Dan> (because it 'kills' my emacs session 100% of the time)...

    Dan> 1) start an R process from within a buffer of emacs (M-x R)
    Dan> 2) (actually) split the screen (C-x 2)
    Dan> 3) (actually) jump back to the original buffer (C-x b <ret>)
    Dan> 4) send the first line 'par(ask=T)' with 'ess-eval-line' (and <ret>)

I always use C-c C-n which is a bit different from C-c C-j (ess-eval-line)
but the point is in "5)" :
 
    Dan> 5) send the following *region* after marking with the mouse...

    Dan> plot(rnorm(50))
    Dan> plot(rnorm(50))

    Dan> using ess-eval-region

I see no problem --- only because I always have customized
ess-eval-visibly-p to 'nil' instead of the default 't'.

But even if I set it to 't'; there's no big problem:

Simple  C-g  solves the ``hanging''  -- as in other situations 
in ESS, e.g., when a long-lasting computation keeps emacs
waiting for the prompt, a simple C-g  stops the "waiting loop".

    Dan> ...

    Dan> My emacs session is hanging...

I

    Dan> Is there an option to set to allow me to see R 'thinking' while it is 
    Dan> buisy? Like if I had a big loop that output progress information, all 
    Dan> the progress information gets dumped at the end, after the loop has 
    Dan> finished. I would like to see progress 'as it happens' ... I think it is 
    Dan> related to this problem (anybody else see that with different version 
    Dan> of emacs?)

    Dan> Cheers,
    Dan> Dan.




    >> Martin Maechler, ETH Zurich
    >> 
    Dan> Basically I think the fact that the emacs buffer 'hangs' while R is 
    Dan> 'buisy' causes the problem. The first plot request is sent, and the 
    Dan> buffer hangs as R becomes 'buisy', then R asks for user input, but that 
    Dan> request is never echoed back to the user (because the buffer is 
    Dan> 'hanging'). This is just a guess.
    >> 
    Dan> If the emacs buffer didn't go unresponsive while R is buisy, I don't 
    Dan> think this problem would occur. Like when you run a big process in R, 
    Dan> you can't use that emacs session for anything else because it is waiting 
    Dan> on R to finish.

unless you use  C-g ...

    Dan> Any way to get round this 'hang'?

I think it's the simple  C-g  ..

    >> 
    Dan> Cheers,
    Dan> Dan.




More information about the ESS-help mailing list