emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: Emacs-orgmode Digest, Vol 137, Issue 4
       [not found] <mailman.85.1499184016.15271.emacs-orgmode@gnu.org>
@ 2017-07-06  2:25 ` edgar
       [not found] ` <6982552ae62d463c859786901f4645ae@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 0 replies; 2+ messages in thread
From: edgar @ 2017-07-06  2:25 UTC (permalink / raw)
  To: emacs-orgmode

> Date: Tue, 04 Jul 2017 09:54:13 +0100
> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> 
> 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?

Oh! interesting. I have been calling functions like
#+BEGIN_SRC python :noweb yes :dir "../Data/Raw"
<<my-reference>>
#+END_SRC

with partial success (without "nesting"--calling a block with a 
reference to yet another block). I guess that "nested" calling of Noweb 
blocks is not really possible. Thank you for the answer :)

-------------------------------------------------

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: Emacs-orgmode Digest, Vol 137, Issue 4
       [not found] ` <6982552ae62d463c859786901f4645ae@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-07-06  8:48   ` Eric S Fraga
  0 siblings, 0 replies; 2+ messages in thread
From: Eric S Fraga @ 2017-07-06  8:48 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 575 bytes --]

Philosophically, #+call: or call_ are very different to noweb.

The latter is really only about insertion of code as is somewhere else
and it can be nested (see contrived example attached).  The former is
about invoking a babel src block with particular arguments and so is
much more flexible.  That block could of course include noweb elements:
again see example.

Export the org file to an ascii buffer (C-c C-e t A) and you'll see the
code expansions due to noweb and the result of calling a src block.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-551-g92e8c8

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: t.org --]
[-- Type: text/x-org, Size: 260 bytes --]

#+name: one
#+begin_src octave :noweb yes
a = 1
#+end_src
#+name: two
#+begin_src octave :noweb yes
<<one>>
b = 2
#+end_src
#+name: three
#+begin_src octave :noweb yes
<<two>>
a+b
#+end_src

#+results: three
: 3

The results of calling three are call_three().

[-- 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-06  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.85.1499184016.15271.emacs-orgmode@gnu.org>
2017-07-06  2:25 ` Emacs-orgmode Digest, Vol 137, Issue 4 edgar
     [not found] ` <6982552ae62d463c859786901f4645ae@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-07-06  8:48   ` Eric S Fraga

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).