From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Omitting try/catch blocks from tangled R code? Date: Fri, 7 Feb 2014 00:18:38 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBels-00059H-CU for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 01:18:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBelr-00087e-6E for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 01:18:40 -0500 Received: from mail-oa0-x229.google.com ([2607:f8b0:4003:c02::229]:39566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBelr-00087a-1E for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 01:18:39 -0500 Received: by mail-oa0-f41.google.com with SMTP id j17so3704230oag.28 for ; Thu, 06 Feb 2014 22:18:38 -0800 (PST) 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: emacs-orgmode Greetings, I don't usually tangle, but am creating a code file to go along with a presentation I'm giving this weekend so that attendees can try things out afterward by cloning my github repo where all the data and necessary files are stored. In my presentation (Beamer), I create plots via the R pdf() device, and noticed that all of the tangled code where plots are generated contains the following: pdf(file="file.pdf"); tryCatch({ code block contents here },error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); paste('ERROR', e$message, sep=' : ')}); dev.off() Is there a way to omit this? I'm guessing this is here to create a blank plot with the error as the output when something goes awry? I checked around variable completions of org-babel-tangle-* and searched google for terms like "org babel tangle try catch" but am not finding anything that looks like what I need. Thanks, John