From: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: org babel before excute hook
Date: Fri, 11 Oct 2013 16:31:38 -0400 [thread overview]
Message-ID: <CAJ51ETpqTsHmeLatSx4bp_vW3+cT+a2QcJgQWbHew1fxcMOwiA@mail.gmail.com> (raw)
In-Reply-To: <CAO8D54wYb88EBLUPK7HjMRE5=H1Kpe-zxibkYoVRvxiV2obaEw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]
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 would be sufficient for my needs.
John
John
-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
On Fri, Oct 11, 2013 at 9:56 AM, Henning Redestig <henning.red@gmail.com>wrote:
> 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 would like to add functionality so that org-babel-execute-src-block
> checks if in :results graphics FILE, FILE is already referred to by another
> source block and if so refuse to evaluate.
>
> However, I only see a org-babel-after-execute-hook but no
> org-babel-before-execute-hook
>
> any reason for this? I could try to write a patch but thought I'd ask
> first.
>
> ....or if there is an even better approach to avoid overwriting output
> from different source blocks..
>
> //Henning
>
[-- Attachment #2: Type: text/html, Size: 2151 bytes --]
next prev parent reply other threads:[~2013-10-11 20:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 13:56 org babel before excute hook Henning Redestig
2013-10-11 20:31 ` John Kitchin [this message]
2013-10-12 2:28 ` Charles Berry
2013-10-12 13:11 ` Henning Redestig
2013-10-13 21:22 ` Henning Redestig
2013-10-13 21:35 ` Samuel Wales
2013-10-14 6:45 ` Henning Redestig
2013-10-14 8:11 ` [babel] Feature request - WAS: " Rainer M Krug
2013-10-14 13:24 ` Eric Schulte
2013-10-26 22:05 ` Samuel Wales
2013-10-14 13:29 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ51ETpqTsHmeLatSx4bp_vW3+cT+a2QcJgQWbHew1fxcMOwiA@mail.gmail.com \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).