From mboxrd@z Thu Jan 1 00:00:00 1970 From: edgar@openmail.cc Subject: :noweb from external file Date: Thu, 22 Jun 2017 22:08:16 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOAHI-0006cW-E0 for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 18:08:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOAHE-0003rK-7j for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 18:08:40 -0400 Received: from onethreetwo.vfemail.net ([199.16.11.132]:59315 helo=vfemail.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOAHE-0003qz-0X for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 18:08:36 -0400 In-Reply-To: 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" To: emacs-orgmode@gnu.org Hello, I would like to know if someone knows how I can achieve something like this (importing a block of code from another file): Definition of the original code: ../dir1/file1.org ============================== #+NAME: py-numpy #+CAPTION: Loading Numpy and Matplotlib onto Python. #+BEGIN_SRC python :results none import numpy as np from matplotlib import pyplot as pl #+END_SRC ============================== I would like something like this: ../dir2/file2.org ============================== #+NAME: py-noweb #+CAPTION: Loading Numpy and Matplotlib onto Python. #+BEGIN_SRC python :results none :noweb yes <<../dir1/file1.org::py-numpy>> #+END_SRC ============================== Right now, I can only do it like this: ../dir2/file3.org ============================== #+INCLUDE: ../dir1/file1.org::py-numpy #+NAME: py-noweb #+CAPTION: Loading Numpy and Matplotlib onto Python. #+BEGIN_SRC python :results none :noweb yes <> #+END_SRC ============================== I know that there is Library of Babel, but I don't know how to use it (I installed it through ELPA). The documentation mentions a ~doc~ directory, but I don't have such a directory in ~/.emacs.d/elpa/org-*/. Besides, it may be that I don't always want to store my functions in the library. Thanks! ------------------------------------------------- ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!