Re: [O] org babel before excute hook

2013-10-26 Thread Samuel Wales
I have confirmed that this works. Thank you. On 10/14/13, Eric Schulte wrote: > I just pushed up a change so that `org-confirm-babel-evaluate' will > always be called from the head of the code block being evaluated. So > the info can always be reached with something like the following. > >

Re: [O] org babel before excute hook

2013-10-14 Thread Eric Schulte
Henning Redestig writes: > Is it possible to add a function to org-ctrl-c-ctrl-c-hook without patching > ob-core.el? If I just add something like > Yes, see the documentation of `org-confirm-babel-evaluate'. So the function posted in your previous email could be changed to something like...

Re: [O] org babel before excute hook

2013-10-14 Thread Eric Schulte
Samuel Wales writes: > In case it helps, there is org-confirm-babel-evaluate. > > (But I have not found it to be useful, because it does not seem to > place point in a place where you can check properties, etc.) > I just pushed up a change so that `org-confirm-babel-evaluate' will always be call

Re: [O] org babel before excute hook

2013-10-13 Thread Henning Redestig
if anyone is interested in this, a simple defadvice appears to be a good option, I put (defadvice org-babel-execute-maybe (around org-babel-stop-on-collision) "stop execution of result file defined more than once" (let ((info (org-babel-get-src-block-info))) (setq result-file (cdr (assoc :

Re: [O] org babel before excute hook

2013-10-13 Thread Samuel Wales
In case it helps, there is org-confirm-babel-evaluate. (But I have not found it to be useful, because it does not seem to place point in a place where you can check properties, etc.) Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have

Re: [O] org babel before excute hook

2013-10-13 Thread Henning Redestig
Is it possible to add a function to org-ctrl-c-ctrl-c-hook without patching ob-core.el? If I just add something like (add-hook 'org-ctrl-c-ctrl-c-hook 'org-babel-stop-if-file-collision) in my .emacs I notice that my addition gets overwritten later via the autoloads (I think) that are defined in o

Re: [O] org babel before excute hook

2013-10-12 Thread Henning Redestig
I thought about temp files, but that makes the file names cryptic which is inconvenient for communication without people outside org.. also, I tend recompile figures many times which would cause a lot of cluttering files that are hard to delete since you don't know which file is the one currently l

Re: [O] org babel before excute hook

2013-10-11 Thread Charles Berry
John Kitchin andrew.cmu.edu> writes: > > > > I have a related kind of problem. When preparing notes > for a class, I may end up with 70 code blocks in an org file, many of > which create graphics. I am always worried about accidentally using the > same filename and overwriting a graphic fro

Re: [O] org babel before excute hook

2013-10-11 Thread John Kitchin
I have a related kind of problem. When preparing notes for a class, I may end up with 70 code blocks in an org file, many of which create graphics. I am always worried about accidentally using the same filename and overwriting a graphic from an earlier block. A unique, but reproducible filename wou

[O] org babel before excute hook

2013-10-11 Thread Henning Redestig
I collaborate with different people on the same orgfile which contains many source blocks that generate graphics by e.g. :results graphics abc.pdf It can happen that I or someone else accidentally create another independent source block that overwrites my abc.pdf which is of course very bad. I wo