[ESS] Open .R files from backtrace as read-only?

Vitalie Spinu spinuvit at gmail.com
Wed Jun 5 10:39:51 CEST 2013


 >> Rainer M Krug <Rainer at krugs.de>
 >> on Mon, 03 Jun 2013 13:53:00 +0200 wrote:

 > Hi
 > I am using org-mode for programming, therefore editing my .R files
 > directly is futile, as the edits will be overwritten by the next
 > tangle. Nevertheless, it happens to me from time to time, mainly when I
 > am debugging and open the .R file from the ess-traceback buffer.

 > Would it be possible, to have an option to open the .R file from the
 > ess-tracebak buffer as read-only?

And how to distinguish which files you want read only and which you
don't. This doesn't look to me like a very useful features. 

Would it be feasible to redirect source references to original org file?

Something of that kind now works with org's C-c '. If you evaluated
functions in org edit buffer. You will be redirected to original org
file on errors or debug. It doesn't work with org's C-c C-c as yet, but
I am looking into it.

 > Or is there another way of achieving this?

There is visit-file-hook. You can add to it a simple function that
checks for a file name and marks buffer read only.

    Vitalie



More information about the ESS-help mailing list