emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] :noweb & library of babel


From: edgar
Subject: [O] :noweb & library of babel
Date: Mon, 03 Jul 2017 18:58:13 +0000
User-agent: Roundcube Webmail/1.2.4

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!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]