From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: [BABEL] BUG Re: Omitting try/catch blocks from tangled R code? Date: Tue, 18 Mar 2014 16:56:29 -0500 Message-ID: References: <52F498AE.6090802@krugs.de> <87siruamo3.fsf@gmail.com> <52F5326C.7010505@krugs.de> <877g7syio6.fsf@gmail.com> <87txawwwh6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQ1zt-0000sx-7q for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 17:56:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQ1zq-0007rc-47 for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 17:56:33 -0400 Received: from mail-yh0-x22a.google.com ([2607:f8b0:4002:c01::22a]:48842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQ1zp-0007rP-W8 for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 17:56:30 -0400 Received: by mail-yh0-f42.google.com with SMTP id t59so7795004yho.1 for ; Tue, 18 Mar 2014 14:56:29 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer M Krug Cc: emacs-orgmode , Eric Schulte On Tue, Mar 18, 2014 at 3:44 AM, Rainer M Krug wrote: > Eric Schulte writes: > >> John Hendy writes: >> >>> On Mon, Mar 17, 2014 at 10:00 AM, Eric Schulte wrote: >>>> John Hendy 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: RMKruggmailcom