[ESS-bugs] tracking options(continue= *) etc ? {was "..Starting eval... hangs"}

Martin Maechler maechler at stat.math.ethz.ch
Thu Aug 17 18:29:22 CEST 2006


>>>>> "RoSp" == Rodney Sparapani <rsparapa at mcw.edu>
>>>>>     on Thu, 17 Aug 2006 09:44:46 -0500 writes:

    RoSp> Gregor Gorjanc wrote:
    >> Hello!
    >> 
    >> I hope I am not sending this twice, however it does seem that I did not
    >> sent mail successfully from my Emacs.
    >> 
    >> I tried again with my problem of hanging ESS when sending region to R
    >> process. Previous posts on this can be found at
    >> 
    >> https://stat.ethz.ch/pipermail/ess-help/2006-March/003397.html
    >> 
    >> For the reference, here is the description:
    >> 
    >> 
    >>> I started to use ESS for direct acces to R - I copied R code before to
    >>> terminal and now decided to move to ESS. It is nice, but I constantly
    >>> experience strange hanging when evaluating the code bellow. If I use C-c
    >>> C-n it goes smoothly, but when I use C-c C-r on "data.frame" part or on
    >>> the whole code I can see the Starting evaluation... message in modeline,
    >>> but it does not end it just continues and I can not stop this with C-c C-c.
    >>> 
    >>> Did I misunderstood the ess-eval-region command? I highlight the code
    >>> and issue C-c C-r. Should I do anything else to define a region or ... ?
    >>> 
    >> 
    >> I figured out what was causing the problem. I tried with emacs "vanilla"
    >> i.e. emacs -q and issued the following:
    >> - C-u M-x R RET --vanilla RET RET (last RET for working directory)
    >> - C-x C-f scratch.R RET
    >> - type some multiline R code such as
    >> 
    >> cat("this is a simple text in
    >> many (at least two) lines")
    >> 
    >> and it worked fine with eval-region.
    >> 
    >> After some trial and error I found out, that the following setting
    >> causes my problem. Start emacs "vanilla" i.e. emacs -q and issue the
    >> following:
    >> - C-u M-x R RET --vanilla RET RET (last RET for working directory)
    >> - C-x C-f scratch.R RET
    >> - type the following code to reproduce the problem (run first options()
    >> line and then cat() with eval-region to see the effect clearly)
    >> 
    >> options(continue=" ")
    >> 
    >> cat("this is
    >> simple multiline R code")
    >> 
    >> - and I get the same error as described above - Starting evaluation...
    >> message appears in modeline and my Emacs is completely hanged (I can
    >> stop with C-g). It appears that ESS is having problems when continue
    >> argument starts with space i.e. options(continue=" +") also causes
    >> problem. I hope this can be fixed so I can normaly use my favourite
    >> continue argument.
    >> 
    >> Bellow is output produced by debug-on-quit and by M-x ess-submit-bug-report
    >> Thank you for such a great interface to R!
    >> 
    >> 
    RoSp> Hi Gregor:

    RoSp> Stephen commented on this problem in June; see the link below.  My 
    RoSp> advice would go like the old joke:

    RoSp> Man:      Doctor, it hurts when I do this?
    RoSp> Doctor:  Don't do that!

I actually had the same thought..

So, Stephen here tells how to do it "manually" :
    RoSp> http://article.gmane.org/gmane.emacs.ess.general/1835

{{Stephen: It would be phantastic if you could add this to the 
	   ESS manual ...}}

Of course, in principle, ESS could track even more than it does now:
it currently already looks at  "?"  "help("  "library(" ..
and takes action for these.

So we could do the same for options(..)
and in particular not only for
   options(prompt   = .)      and
   options(continue = .)  
but also
   options(width = .)  

But of course the drawback of such an approach is that it only
works when the functions are used explicitly at the prompt,
but not when they are inside "eval-region" {which actually
already now can be a bit confusing} or even when just inside
another function that is called.

Martin




More information about the ESS-bugs mailing list