From a79a7f9e6af9d1479df15e2402f52615d76d2421 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Wed, 2 Sep 2009 14:08:49 -0400 Subject: [PATCH] More notes on org-src-mode patch and ESS --- org-babel.org | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/org-babel.org b/org-babel.org index 156388ae3..0c33b3060 100644 --- a/org-babel.org +++ b/org-babel.org @@ -391,7 +391,7 @@ org-feed.el has a (require 'sha1) and org-publish.el uses it too. -- Bernt #+end_quote -** TODO support for working with =*Org Edit Src Example*= buffers [4/6] +** TODO support for working with =*Org Edit Src Example*= buffers [4/7] *** STARTED Patch against org source. I've worked on several related changes to source code edit buffer behaviour in the org core. My current patch (below) does the @@ -502,6 +502,27 @@ org-feed.el has a (require 'sha1) and org-publish.el uses it too. a good thing, because one should not leave active edit buffers around: you should always have exited with C-c ' first. +**** TODO Doesn't currently work with ess-load-file + ess-load-file contains these two lines +#+begin_src emacs-lisp + (let ((source-buffer (get-file-buffer filename))) + (if (ess-check-source filename) + (error "Buffer %s has not been saved" (buffer-name source-buffer))) +#+end_src + +which have the effect of, in the course of saving, deleting the buffer +`source-buffer', and then attempting to use it subsequently. The only +solution I have thought of so far is submitting a patch to ess which +would, e.g. reverse the order of those two lines (perform the error +check outside the let binding). + +In fact, even after doing that there are further problems generated by +the fact that the edit buffer has an associated filename for which the +file doesn't exist. I think this worked OK in the past when the edit +buffer had no associated filename. So this is a problem which needs +addressing. Maybe defadvice could be used on ess functions where +necessary to make org/org-babel play nicely with ess? + *** DONE name edit buffer according to #+srcname (and language?) See above patch agains org. *** DONE optionally evaluate header references when we switch to =*Org Edit Src*= buffer -- 2.11.4.GIT