From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Miele Subject: Re: noweb and :var statements Date: Sun, 06 Oct 2019 19:52:00 +0000 Message-ID: <87imp1irdr.fsf@gmail.com> References: <87k19hg7g1.fsf@gmail.com> <87k19hirz7.fsf@gmail.com> Reply-To: sebastian.miele@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57990) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHCZY-0008So-CT for emacs-orgmode@gnu.org; Sun, 06 Oct 2019 15:52:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHCZX-0005JH-CJ for emacs-orgmode@gnu.org; Sun, 06 Oct 2019 15:52:04 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:35392) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHCZX-0005J5-73 for emacs-orgmode@gnu.org; Sun, 06 Oct 2019 15:52:03 -0400 Received: by mail-wm1-x32e.google.com with SMTP id y21so10325016wmi.0 for ; Sun, 06 Oct 2019 12:52:03 -0700 (PDT) Received: from tisch ([2a02:908:175c:4260:5ffc:7882:6024:ca5b]) by smtp.gmail.com with ESMTPSA id q10sm37248080wrd.39.2019.10.06.12.52.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Oct 2019 12:52:01 -0700 (PDT) In-reply-to: <87k19hirz7.fsf@gmail.com> 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 I wrote: > [..] > > However, something like the following may suit your use case. (For the > header-args property see section 15.2 (Using Header Arguments) of the > manual.) > > * A Heading > :PROPERTIES: > :header-args: :var table=table_foo > :END: > > #+NAME: table_foo > | foo | > |-----| > | 42 | > | 100 | > > #+NAME: import > #+BEGIN_SRC python > import numpy as np > table = np.array(table).astype(np.float).flatten() > #+END_SRC > > #+BEGIN_SRC python :noweb yes :tangle import_noweb.py > <> > #+END_SRC Just the following works too, of course: #+NAME: table_foo | foo | |-----| | 42 | | 100 | #+NAME: import #+BEGIN_SRC python import numpy as np table = np.array(table).astype(np.float).flatten() #+END_SRC #+BEGIN_SRC python :noweb yes :var table=table_foo :tangle import_noweb.py <> #+END_SRC