[ESS] Debug mode puts point in the wrong buffer

Marius Hofert marius.hofert at math.ethz.ch
Thu Jun 20 21:14:50 CEST 2013


On Thu, Jun 20, 2013 at 10:33 AM, Vitalie Spinu <spinuvit at gmail.com> wrote:
>  >> Marius Hofert <marius.hofert at math.ethz.ch>
>  >> on Wed, 19 Jun 2013 23:55:10 +0200 wrote:
>
> [...]
>
>
>  > 1) ... M-C and means M-S-c (although this can never be clear since the
>  > keys on a keybard are already shown as uppercase letters whereas they
>  > are lowercase if not pressed with shift... but okay). Why not write
>  > M-S-c? at least it's then clear that M-C does *not* mean 'meta +
>  > control'.
>
>  > 2) ... C-M-S-c for 'cont-multi' ... here, the 'Shift' is denoted by
>  > 'S', probably to avoid the confusion with C-M-C, where the first 'C'
>  > is 'Control' and the second 'C'.
>
> The keys are generated automatically. This is how emacs writes them. By
> convention C always precedes M, so M-C cannot mean Alt+Control, which
> are meaningless anyways.
>
>  > Okay, I now got it to work, but only because I put the point back in
>  > the *R* buffer... that's exactly the behavior I don't understand. Why
>  > do I always have to switch in the other buffer (back go *R*) first
>  > before I can enter debug commands (be it either RET or M-N [indeed,
>  > RET is even simpler in this case :-)]).
>
> It should work from the R script buffer. Unless that script buffer is
> not associated with the process. It looks like a bug to me.
>
> Can you try the following. Create a new test.R and put the following
> into it:
>
>
>    foo <- function(){
>        browser()
>        1 + 2
>    }
>
>
>    foo()
>
> Evaluate the function with C-c C-c. Then foo(). Do you see visual
> debugger jumping and highlighting the line 1+2?
>

yes! *that* example works as you said.

However, when I use...

require(simsalapar)

debug(varlist)
varlist(a)

... to debug the function 'varlist' in our package 'simsalapar' (not
out yet...), I receive "M-N is undefined'.

To make it more reproducible, I tried...

require(copula)

debug(rCopula)
rCopula(100, copula=normalCopula(0.5))

... based on our (already published package 'copula'). But there it
works as expected ... hmmm.... not sure what triggers that bug (but
Martin and I run into it quite often)

Note: I also updated to the latest ESS version and the behavior is
exactly the same.

Cheers,

Marius


>
>
> Now M-N (from test.R) should advance the debugger to exit.
>
>     Vitalie
>



--
ETH Zurich
Dr. Marius Hofert
RiskLab, Department of Mathematics
HG E 65.2
Rämistrasse 101
8092 Zurich
Switzerland

Phone +41 44 632 2423
http://www.math.ethz.ch/~hofertj
GPG key fingerprint 8EF4 5842 0EA2 5E1D 3D7F  0E34 AD4C 566E 655F 3F7C



More information about the ESS-help mailing list