[ESS] edtdbg with Emacs
Norm Matloff
matloff at cs.ucdavis.edu
Fri Dec 3 22:04:52 CET 2010
On Fri, Dec 03, 2010 at 04:51:40PM +0000, Stephen Eglen wrote:
> Dear Norm, thanks for providing this. I'd like to get it working with
> Emacs 23. Can you say what errors you get?
Messages from Emacs to R seem to be getting through, but not vice versa.
The latter are supposed to occur through emacsclient.
For concreteness, say we're using edtdbg to debug test.R.
When one hits the F2 key, it is supposed to trigger two things: (a) R's
browser (i.e. debugger) will execute "n" to execute the current line of
the user's R code, test.R, and (b) the cursor in the Emacs buffer for
test.R will accordingly move to the next line. In other words, as the
user steps through test.R using R's debugger, he/she will see the cursor
in Emacs automatically track that stepping.
Under Emacs 22, both (a) and (b) work, but under Emacs 23, only (a)
works.
> I've just tried running it on my machine, running Emacs 23. Is there a
> typo in edtdbg.el? Line 37 has:
> (dbgsource)
>
> indented to the same level as the previous level as the preceding line:
> (set-mark-command nil))
>
> but that 2nd closing paren marks the end of defun.
Yes, that's deliberate. The function dbgbr() is supposed to set a
breakpoint in test.R by inserting a call to browser(), AND then send R a
command to source that new version of test.R.
Norm
More information about the ESS-help
mailing list