emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: edgar@openmail.cc
To: emacs-orgmode@gnu.org
Subject: :noweb & library of babel
Date: Mon, 03 Jul 2017 18:58:13 +0000	[thread overview]
Message-ID: <f720ee407b5aee7b79485e4124c0f98e@openmail.cc> (raw)

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	other threads:[~2017-07-03 18:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 18:58 edgar [this message]
     [not found] <526b2a53336f4fe4baab2f3e8413f557@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-07-04  8:54 ` :noweb & library of babel Eric S Fraga

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f720ee407b5aee7b79485e4124c0f98e@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 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).