On Tue, Mar 18, 2014 at 3:44 AM, Rainer M Krug <rai...@krugs.de> wrote: > Eric Schulte <schulte.e...@gmail.com> writes: > >> John Hendy <jw.he...@gmail.com> writes: >> >>> On Mon, Mar 17, 2014 at 10:00 AM, Eric Schulte <schulte.e...@gmail.com> >>> wrote: >>>> John Hendy <jw.he...@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