From: "Eric Schulte" <schulte.eric@gmail.com>
To: Austin Frank <austin.frank@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Org-mode and ESS
Date: Wed, 12 Nov 2008 19:22:08 -0800 [thread overview]
Message-ID: <87myg4z4wv.fsf@gmail.com> (raw)
In-Reply-To: m0d4h0loin.fsf@gmail.com
Austin Frank <austin.frank@gmail.com> writes:
> On Tue, Nov 11 2008, Graham Smith wrote:
>
>> Is any one using Org-mode with ESS. ESS seems to need a file with a
>> *.R name to work, but it would be really useful to use Org-mode
>> features to keep notes of comments and code, before sending to R, and
>> of course to copy results back into an Org-Mode file from R.
>>
>> As a search here and a google hasn't thrown up anything obvious, I
>> assume not, but I thought I would ask.
>
> In my local git repo of the org sources I have a pretty nice setup for
> using R or S inside org-mode. I liked the in-file native editing of
> source code so much that I decided that I wanted to use org files as
> source files with Sweave (instead of using .Rtex or .Rnw files). My
> goal was to export documents with embedded R code, rather than to use
> org within the comments of R files. I can certainly see a use for the
> latter approach (which seems to be what you have in mind), as well.
>
> There was recently a thread where someone created a preprocessing system
> for specific types of blocks.
Hi Austin,
I would be interested to help extend the block prepreocessing system to
handle cases like the one you mention here.
>
> Basically, in the workflow I've developed, I create a file with the
> extension .Rorg, say homework_key.Rorg. Within that file, I can embed
> blocks of R code, and can refer to variables defined in the R code
> contained in the document.
>
> #+BEGIN_R
> a <- 3
> a
> #+END_R
>
> * the value of a is \R{a}
> * the value of a + 3 is \R{a + 3}
>
In the above example how would you/Sweave handle the case where there
are multiple R blocks in the same file? For example
#+BEGIN_R
a <- 3
a
#+END_R
- the value of a is \R{a}
- the value of a + 3 is \R{a + 3}
#+BEGIN_R
a <- 8
a
#+END_R
- the value of a is \R{a}
- the value of a + 3 is \R{a + 3}
With that questions answered it should be relatively straightforward to
implement exporting as you described using only org-mode's block
processing, and letting ESS do the actual calculations all without any
dependence on Sweave.
> I haven't put the code anywhere public because there are several things
> I still need to do:
>
> - test graphic creation and export
if you have examples of graphic creation, I'd be interested to see how
they work, and relatedly how difficult it would be to move that
functionality into org-mode.
However I think the rest of the point you make immediately below would
be easily addressed through using an org-mode only approach.
> - improve generation of latex headers
> - automate processing from .Rorg to .tex (or .pdf) (currently at least 3
> steps, should be 1)
> - come up with suggested keybindings for inserting the #+BEGIN/END_R
> blocks
If you happen to use yasnippets, I find it makes the creation of blocks
in org files a very quick/easy experience. See
http://legito.net/worg/org-configs/index.php#sec-2.1 for details.
>
> - create a driver to generate HTML instead of \LaTeX
>
Cheers -- Eric
next prev parent reply other threads:[~2008-11-13 3:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 18:00 Org-mode and ESS Graham Smith
2008-11-11 18:30 ` Detlef Steuer
2008-11-11 19:13 ` Graham Smith
2008-11-12 19:42 ` Austin Frank
2008-11-12 19:51 ` Graham Smith
2008-11-12 20:45 ` Detlef Steuer
2008-11-13 3:22 ` Eric Schulte [this message]
2008-11-13 5:40 ` Austin Frank
2008-11-14 1:22 ` Eric Schulte
2008-11-16 1:50 ` Eric Schulte
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87myg4z4wv.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=austin.frank@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.