From: edgar@openmail.cc
To: emacs-orgmode@gnu.org
Subject: :noweb from external file
Date: Thu, 22 Jun 2017 22:08:16 +0000 [thread overview]
Message-ID: <adc140ef9bcfc8cca3c45af3b6b5e943@openmail.cc> (raw)
In-Reply-To: <mailman.109.1498147218.16109.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
<<py-numpy>>
#+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!
next parent reply other threads:[~2017-06-22 22:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.109.1498147218.16109.emacs-orgmode@gnu.org>
2017-06-22 22:08 ` edgar [this message]
2017-06-24 6:03 ` :noweb from external file edgar
2017-07-01 6:53 ` edgar
2017-07-01 7:36 ` edgar
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adc140ef9bcfc8cca3c45af3b6b5e943@openmail.cc \
--to=edgar@openmail.cc \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.