[ESS] Previous/Next error in ESS tracebug

Sebastien Vauban sva-news at mygooglest.com
Thu Aug 21 16:04:09 CEST 2014


Hello Vitalie,

Thanks for answering!

Vitalie Spinu wrote:
> Sebastien Vauban on Wed, 20 Aug 2014 20:08:27 +0200 wrote:
>> I'm trying to use the debugging features of tracebug, but have problems
>> understanding how to use 'em all; in particular, I already have troubles
>> using next/previous error.
>
>> As you can see on http://screencast.com/t/VKapcfM8S7m, the only answer
>> I get (be it in the source buffer or in the iESS buffer) is:
>
>> - Before first reference, or
>> - Beyond last reference
>
>> What am I missing?
>
> If you have traceback buffer open (C-c `) then next/previous error (M-g
> n/p) navigate in that buffer, regardless of your current buffer.

OK, so I was missing that: the fact that I previously have to open the
"traceback" buffer, before trying the navigation commands...

What are the conditions to get one such buffer?  Is it relative to the
first (or last) error, or to all of them at once?

In the following buggy code (which I eval with C-c C-c):

--8<---------------cut here---------------start------------->8---
stop("Test error")
source(file = "missing-file.R")
list(a=22, b=343)
^
protocol <- NULL
paste("{**", })
--8<---------------cut here---------------end--------------->8---

I have "No traceback available" when pressing C-c `...

> If you have just got an error and you see it in the *R* buffer then
> next/previous error navigate through highlighted errors in *R* buffer,
> but only through the most recent ones. Most recent errors are located
> after the last evaluation marker, the small arrow in the margin.
>
> Before/beyond last reference means that all your errors are located
> before the last eval marker. You can always click the old errors if you
> want.

Not in such an iESS buffer, though:

--8<---------------cut here---------------start------------->8---
> stop("Test error")
Error: Test error
> source(file = "missing-file.R")
Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file 'missing-file.R': No such file or directory
> list(a=22, b=343)
$a
[1] 22

$b
[1] 343

> ^
Error: unexpected '^' in "^"
> protocol <- NULL
> paste("{**", })
Error: unexpected '}' in "paste("{**", }"
> 
--8<---------------cut here---------------end--------------->8---

On a side note, I found your test.R file, and tried to follow the
instructions on
http://code.google.com/p/ess-tracebug/wiki/GettingStarted, but (while
I now have a traceback buffer -- with either C-c C-c, C-c C-l or C-M-x)
I have another error:

    "Reference to '<path-to-file>' not found"

Somehow, the "c" letter drive is not parsed correctly, and the file is
not found then... See http://screencast.com/t/dRGLA4kn5mO.

UPDATE: I just found out that if I eval my above buggy code with C-c C-l
(instead of C-c C-c), I do have a backtrace, but the same problem
arises, with the "uninterpreted drive letter"...

BTW, why is C-c C-c sufficient on your test.R file, and not on my
error.R file (with the above buggy code)?  With C-c C-c, I get no
backtrace info, well with C-c C-l...

Best regards,
  Seb

-- 
Sebastien Vauban



More information about the ESS-help mailing list