From: Ken Mankoff <mankoff@gmail.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Babel: Call A when executing B
Date: Sun, 22 Feb 2015 09:54:16 -0500 [thread overview]
Message-ID: <m27fvahu93.fsf@gmail.com> (raw)
I'd like to have some language specific code (either a code block in the
Library of Babel, in the current file, embedded in elisp in my startup
file, wherever) run each time I execute any code block. Is there a way
to specify this via header arguments, or :prologue, or anything else of
that type?
Reason: Org python Babel configured to work with IPython works great,
but has some limitations, such as src_python{} calls not working. I
think one way to fix this is to have babel run with python, not IPython,
but then pre-load all the packages that make IPython great.
To be specific, how can I executed "import numpy as np" each time I "C-c
C-c" on a "+#BEGIN_SRC python" code block?
Thanks,
-k.
next reply other threads:[~2015-02-22 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-22 14:54 Ken Mankoff [this message]
2015-02-22 17:04 ` Babel: Call A when executing B Thomas S. Dye
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=m27fvahu93.fsf@gmail.com \
--to=mankoff@gmail.com \
--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).