* :noweb & library of babel
@ 2017-07-03 18:58 edgar
0 siblings, 0 replies; 2+ messages in thread
From: edgar @ 2017-07-03 18:58 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I would like to know if someone can help me, please.
1. I currently have a file called
code-blocks.org. Let us say that it has something
like this:
code-blocks.org
==========
* Routines
** numpy_import.py
#+NAME: py-Routines-numpy_import.py
#+CAPTION: py-Routines-numpy_import.py
#+BEGIN_SRC python :results none :noweb yes :tangle
Routines/numpy_import.py
# Numerical package
import numpy as np
# Plots
from matplotlib import pyplot as pl
#+END_SRC
* Test
** simple.py
#+NAME: py-Test-simple_damage.py
#+CAPTION: py-Test-simple_damage.py
#+HEADER: :var fname="steps.csv"
#+HEADER: :dir "../Data/Raw"
#+HEADER: :exports none :results none
#+BEGIN_SRC python :noweb yes :tangle ./Damage/simple_damage.py :session
<<py-Routines-numpy_import.py>>
#+END_SRC
==========
2. I load it into the library of babel with
~org-babel-lob-ingest~ (~C-c C-v i~).
3. Then, I have another file called tjp.org, which
may look something like this (please, read the contents):
tjp.org
==========
* My tasks
** Go here
- [X] This is a working example
The following block works well: I can issue
C-c C-c, C-c C-v v and the contents are
parsed correctly.
#+HEADER: :exports none :results none :eval no-export
#+BEGIN_SRC python :noweb yes :dir "../Data/Raw"
<<py-Routines-numpy_import.py>>
#+END_SRC
- [-] This does not work
If I do C-c in the following block
#+HEADER: :exports none :results none :eval no-export
#+BEGIN_SRC python :noweb yes :dir "../Data/Raw"
<<py-Test-simple_damage.py>>
#+END_SRC
I get an error:
#+BEGIN_EXAMPLE
File "<stdin>", line 2
<<py-Test-simple_damage.py>>
^
SyntaxError: invalid syntax
#+END_EXAMPLE
If I do C-c C-v v, I see this:
#+BEGIN_EXAMPLE
<<py-Routines-numpy_import.py>>
#+END_EXAMPLE
- [ ] If I put all the blocks in the same file,
everything works.
==========
Does anybody know what I am doing wrong? Thanks :) .
#+BEGIN_SRC elisp
(emacs-version)
#+END_SRC
#+RESULTS:
: GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
: of 2015-01-11 on maritornes, modified by Debian
#+BEGIN_SRC elisp
(org-version)
#+END_SRC
#+RESULTS:
: 9.0.9
-------------------------------------------------
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!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: :noweb & library of babel
[not found] <526b2a53336f4fe4baab2f3e8413f557@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-07-04 8:54 ` Eric S Fraga
0 siblings, 0 replies; 2+ messages in thread
From: Eric S Fraga @ 2017-07-04 8:54 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 751 bytes --]
On Monday, 3 Jul 2017 at 18:58, edgar@openmail.cc wrote:
> Hello,
>
> I would like to know if someone can help me, please.
>
> 1. I currently have a file called
> code-blocks.org. Let us say that it has something
> like this:
[...]
> - [-] This does not work
>
> If I do C-c in the following block
>
> #+HEADER: :exports none :results none :eval no-export
> #+BEGIN_SRC python :noweb yes :dir "../Data/Raw"
>
> <<py-Test-simple_damage.py>>
> #+END_SRC
I may be wrong but I thought that the library of babel provides a means
of calling (#+CALL: or inline) the codes in the library but not
necessarily use noweb to include them in other codes?
--
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-573-g09e612
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-04 8:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <526b2a53336f4fe4baab2f3e8413f557@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-07-04 8:54 ` :noweb & library of babel Eric S Fraga
2017-07-03 18:58 edgar
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).