emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Error Embedding SQL Source from code block into R Source of Another (noweb)
Date: Tue, 30 Sep 2014 15:15:25 -0400	[thread overview]
Message-ID: <8738b8j4xe.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: 87mw9hqiv1.fsf@air.ben-zion.org

Eric Brown <brown@fastmail.fm> writes:

> 2) Grant, I tried your code, but there seem to be some missing headers.
> Do you have a complete minimal example that exhibits the behavior that
> you have demonstrated?

Add :noweb yes. Also Grant seems to have gone non-standard and replaced
the <<noweb>> markup with guillemots. Using the default markers,
it should read:

--8<---------------cut here---------------start------------->8---
#+name: query
#+begin_src sql
select
    *
from
    table
where
    x > 10
#+end_src

#+begin_src R :noweb yes :tangle output.R
input <- '
    <<query>>
'
#+end_src
## ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂
produces this
## ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂
input <- '
    select
        *
    from
        table
    where
        x > 10
'
--8<---------------cut here---------------end--------------->8---

Nick

  parent reply	other threads:[~2014-09-30 19:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30  0:39 Error Embedding SQL Source from code block into R Source of Another (noweb) Eric Brown
2014-09-30  8:05 ` Rainer M Krug
2014-09-30 13:36   ` Grant Rettke
2014-09-30 14:32     ` Eric Brown
2014-09-30 18:46       ` Grant Rettke
2014-09-30 19:15       ` Nick Dokos [this message]
2014-09-30 23:16         ` Grant Rettke
2014-10-01  2:23           ` Nick Dokos
2014-10-01 17:23             ` Grant Rettke
2014-10-01 17:43               ` Nick Dokos
2014-09-30 15:08 ` Charles Berry
2014-09-30 17:02   ` Eric Brown

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=8738b8j4xe.fsf@alphaville.bos.redhat.com \
    --to=ndokos@gmail.com \
    --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).