From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Babel: Call A when executing B Date: Sun, 22 Feb 2015 09:54:16 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPXvK-0004wm-IM for emacs-orgmode@gnu.org; Sun, 22 Feb 2015 09:54:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPXvG-0006j3-Ss for emacs-orgmode@gnu.org; Sun, 22 Feb 2015 09:54:22 -0500 Received: from mail-qc0-x22f.google.com ([2607:f8b0:400d:c01::22f]:45077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPXvG-0006iy-OY for emacs-orgmode@gnu.org; Sun, 22 Feb 2015 09:54:18 -0500 Received: by qcvp6 with SMTP id p6so7644497qcv.12 for ; Sun, 22 Feb 2015 06:54:18 -0800 (PST) Received: from gorgonzola ([71.58.77.153]) by mx.google.com with ESMTPSA id a66sm25688728qge.4.2015.02.22.06.54.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Feb 2015 06:54:17 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode 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.