From: John Hendy <jw.hendy@gmail.com>
To: Rainer M Krug <Rainer@krugs.de>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
Eric Schulte <schulte.eric@gmail.com>
Subject: Re: [BABEL] BUG Re: Omitting try/catch blocks from tangled R code?
Date: Tue, 18 Mar 2014 16:56:29 -0500 [thread overview]
Message-ID: <CA+M2ft-_3u3h1bOq1UJR6PUnj=6GV9chiOnLqLePBpBq_4VLkw@mail.gmail.com> (raw)
In-Reply-To: <m2ob13rj4w.fsf@krugs.de>
On Tue, Mar 18, 2014 at 3:44 AM, Rainer M Krug <Rainer@krugs.de> wrote:
> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> John Hendy <jw.hendy@gmail.com> writes:
>>
>>> On Mon, Mar 17, 2014 at 10:00 AM, Eric Schulte <schulte.eric@gmail.com> wrote:
>>>> John Hendy <jw.hendy@gmail.com> writes:
>>> Out of curiosity, is there a consensus that this is the preferred
>>> behavior for tangling by default?
>>
>> There may have been a consensus in a single thread motivated by a single
>> use case, which should not necessarily be a global consensus.
>>
>>> I'm guessing at some point it was decided that the need was preferred
>>> to have these bits inserted before/after code blocks, but just trying
>>> to confirm this. It seems odd to me, at least given R's behavior, that
>>> someone would prefer these bits to show up in the tangled file since
>>> they appeared to serve the purpose of having Org not fail during
>>> export vs. benefitting the code in any way (if I wasn't running code
>>> through R, I'd just get the errors directly).
>>>
>>
>> I'd be happy to add :no-expand to the default R header arguments. Or
>> even to change this behavior globally, if the current behavior is
>> universally surprising.
>
> I think the default behavior should be reverted, as tangling and
> exporting are two different things. When I tangle, I want to see the
> code blocks as they are in the org document (with possible variables and
> expansions) but not to create files where I do not put it explicitly
> into a code block. These wrappers have nothing to do with the code, and
> are only there for the exported engine. So I would either revert to the
> original behavior, or, introduce a new header argument,
> e.g. :include-wrappers, which would, if set to t, include the export
> wrappers in the tangled file. This might be useful for debugging
> exporting of code block results, but not for general tangling.
Thanks for chiming in. This was my gut reaction to the default
behavior. I guess we're still only a sample size of 2, but
intuitively, I would think that tangling would be a separate beast in
most cases from exporting. Just to have it on the record, if I tangle,
it's usually to take the code I've used in something like a Beamer
presentation or document and combine it into a single .R file so
someone can run it without needing Org-mode.
Re. the :include-wrappers argument, it sounds like :no-expand already
exists for this purpose... I'd just suggest (especially with your
second opinion) that it be the default value vs. having to manually
set it.
Best regards,
John
>
> Cheers,
>
> Rainer
>
>>
>> Best,
>>
>>>
>>>
>>> John
>>>
>>>> Best,
>>>>
>>>> --
>>>> Eric Schulte
>>>> https://cs.unm.edu/~eschulte
>>>> PGP: 0x614CA05D
>
> --
> Rainer M. Krug
>
> email: RMKrug<at>gmail<dot>com
next prev parent reply other threads:[~2014-03-18 21:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 6:18 Omitting try/catch blocks from tangled R code? John Hendy
2014-02-07 8:26 ` [BABEL] BUG " Rainer M Krug
2014-02-07 16:47 ` Eric Schulte
2014-02-07 19:22 ` Rainer M Krug
2014-03-12 1:13 ` John Hendy
2014-03-17 15:00 ` Eric Schulte
2014-03-17 17:11 ` John Hendy
2014-03-17 17:44 ` Eric Schulte
2014-03-18 8:44 ` Rainer M Krug
2014-03-18 21:56 ` John Hendy [this message]
2014-03-19 19:07 ` Charles Berry
2014-03-20 4:57 ` Eric Schulte
2014-03-20 9:22 ` Rainer M Krug
2014-03-24 2:03 ` Eric Schulte
2014-03-24 10:22 ` Rainer M Krug
2014-03-24 13:16 ` Eric Schulte
2014-03-25 9:37 ` Rainer M Krug
2014-03-26 20:17 ` Eric Schulte
2014-03-28 8:32 ` Rainer M Krug
2014-03-28 8:51 ` Rainer M Krug
2014-03-30 14:19 ` Eric Schulte
2014-03-31 7:52 ` Rainer M Krug
2014-04-02 23:09 ` Eric Schulte
2014-04-07 7:59 ` Rainer M Krug
2014-04-11 2:35 ` 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
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='CA+M2ft-_3u3h1bOq1UJR6PUnj=6GV9chiOnLqLePBpBq_4VLkw@mail.gmail.com' \
--to=jw.hendy@gmail.com \
--cc=Rainer@krugs.de \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
/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).