emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: emacs-orgmode@gnu.org
Subject: Re: Emacs-orgmode Digest, Vol 137, Issue 4
Date: Thu, 06 Jul 2017 09:48:33 +0100	[thread overview]
Message-ID: <8760f6eyse.fsf@t3610> (raw)
In-Reply-To: <6982552ae62d463c859786901f4645ae@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (edgar@openmail.cc's message of "Thu, 6 Jul 2017 02:25:56 +0000")


[-- 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 --]

      parent reply	other threads:[~2017-07-06  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]

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=8760f6eyse.fsf@t3610 \
    --to=e.fraga@ucl.ac.uk \
    --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).