emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Brown <brown@fastmail.fm>
To: Charles Berry <ccberry@ucsd.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Error Embedding SQL Source from code block into R Source of Another (noweb)
Date: Tue, 30 Sep 2014 12:02:16 -0500	[thread overview]
Message-ID: <87h9zpt52f.fsf@air.ben-zion.org> (raw)
In-Reply-To: <loom.20140930T165009-17@post.gmane.org> (Charles Berry's message of "Tue, 30 Sep 2014 15:08:36 +0000 (UTC)")

Charles Berry <ccberry@ucsd.edu> writes:

> Hmmm. Maybe the bug that was fixed by commit
>
>  0fd29a5ee7d14c3695b22998196373b9a3637413
>
> about two weeks back? Make sure ob-R.el is up to date and compiled (or
> that ob-R.elc is deleted).
>
>
> Anyway, your code works as expected for me - first time.
>
> ---
>
> FWIW, I prefer to use :var headers to import strings, but it takes some
> setup:
>
>
>
> #+BEGIN_SRC emacs-lisp
>   (defun grab-src (name)
>     (save-excursion
>       (org-babel-goto-named-src-block name)
>       (nth 1 (org-babel-get-src-block-info 'light))))
> #+END_SRC
>
> #+BEGIN_SRC R :var y=(grab-src "sqlsource") :results output :exports both
>   y
> #+END_SRC
>
> #+RESULTS:
> : [1] "select \n  * \nfrom \n  t \nlimit \n  10"
>

In fact M-x R before evaluation did fix things.  I will try to get the
org source going, which contains the fix.  Otherwise, I might be content
to wait for the fix to make its way into org ELPA.  (I'm on .emacs
complexity overload)

Great idea about the grab-src function! Worked like a charm.

Thanks again,
Eric

      reply	other threads:[~2014-09-30 17:02 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
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 [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=87h9zpt52f.fsf@air.ben-zion.org \
    --to=brown@fastmail.fm \
    --cc=ccberry@ucsd.edu \
    --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).