[ESS] Previous/Next error in ESS tracebug

Vitalie Spinu spinuvit at gmail.com
Fri Aug 22 19:22:57 CEST 2014


 >>> Sebastien Vauban on Fri, 22 Aug 2014 10:21:52 +0200 wrote:

[...]

 >> For non-parsing errors you should always get a trace.

 > Do you mean it should be the case for the "stop" and the "source" of
 > a missing file?

Sorry, I am completely confused. I forgot for a moment how it works.

All errors could have sourse references, including parsing ones. This is
configurable. If you evaluate the buffer (C-c C-b) you will get the
location of ^ parsing error.

Look at `ess-inject-source` which is by default set to
'function-and-buffer'. So if your errors are within a function which you
eval with C-c C-c you will always get nice references. Same for buffer
evaluation (C-c C-b).

You can set it to t and all evaluation commands will automatically
inject the sourse. The reason why this is not the default is that once
C-c C-c start injecting sourse for paragraphs you cannot accumulate
expressions which are spread across multiple paragraphs:

   {
       print("AAA")
   
       print("BBB")
   }

You will get unexpected end of input. This is not a big deal for most
people, so you can try to set `ess-inject-source` to t.

There have been proposals to change the behavior of evaluation commands
to work on complete syntactic blocks. If we have that implemented then
we can always inject the sourse right away. That would be really nice.

   Vitalie



More information about the ESS-help mailing list