[ESS-bugs] OOps! ESS partly fails in non-English locales!

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Wed Aug 3 17:39:09 CEST 2005


To follow up on parsing the output in *ESS-errors*

 >     StEgl> I can fix the regexp for this particular error:
 > 
 >     StEgl> Error in parse(file, n = -1, NULL, "?") : syntax error on line 3
 > 
 >     StEgl> perhaps by a regexp searching for
 > 
 >     StEgl> syntax error on line [line number]
 > 
 >     StEgl> but is that likely to be good enough for catching all R errors?
 > 

Taking a look at the function ess-parse-errors, it would need not just
the line number, but of course, the name of the file!  (One hack could
be to write the name of the source file as a comment at the top of *ESS-errors*
within ess-load-file, e.g. 
 ### Source file: foo.R
so that could then be grabbed by ess-parse-errors.)

However, a longer term thought might be to see if e.g R could output
its errors in a way more typical of  unix commands, e.g. grep:

 M-x grep RET defun *.el RET

The output comes in a format that Emacs finds easy to parse:

ess-comp.el:43:(defun ess-message (msg)
ess-comp.el:60:;;; Components:  defuns, defvars, defconsts

ditto for outptu from gcc which can be parsed easily by Emacs.
Is that likely to be seen favourably by R core?


Stephen




More information about the ESS-bugs mailing list