From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Bug: export aborts if ':eval query/never' in source code blocks Date: Thu, 26 Aug 2010 17:22:06 -0600 Message-ID: <87r5hlymwf.fsf@gmail.com> References: <87r5hl3w09.fsf@gmail.com> <4C76E32A.6050001@ccbr.umn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=58544 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oolrr-0000tS-Sv for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 19:28:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oolrq-0006PQ-9P for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 19:28:23 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:46780) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oolrq-0006PL-3N for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 19:28:22 -0400 Received: by iwn33 with SMTP id 33so2933831iwn.0 for ; Thu, 26 Aug 2010 16:28:21 -0700 (PDT) In-Reply-To: <4C76E32A.6050001@ccbr.umn.edu> (Erik Iverson's message of "Thu, 26 Aug 2010 16:56:58 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Erik Iverson Cc: emacs-orgmode@gnu.org, Paul Sexton Hi Erik, Erik Iverson writes: > Eric, > > As a follow-up on a related issue: > > What if I want to eval a code block for some side-effect, but > *not* include code or results in export. This assumes I'm using > :session. > > Is there a way to currently do that? > this should be possible using the :results silent header argument, for example the following should give the desired behavior --8<---------------cut here---------------start------------->8--- ** eval for side effect on export - one plus one #+source: one-plus-one #+begin_src emacs-lisp :exports none :results silent (+ 1 1) #+end_src - plus one is #+begin_src emacs-lisp :var two=one-plus-one :exports both (+ 1 two) #+end_src --8<---------------cut here---------------end--------------->8--- Cheers -- Eric > > Setting :exports none seems to block evaluating of the code, > can the :eval argument 'override' that so the block is > eval'd, but no export is produced. > > In R, I currently can just put the last line of the block > I want this behavior for as > > NULL > > with :exports results > > and it seems to do what I want. Just wondering if there was > a more 'official' way? > > Here's a sample file that seems to do as I want, with the > NULL trick. Just wonder if :eval can help at all. > > * I want only the 2nd block exported > > #+begin_src R :exports results :session > > x <- 2 + 3 > NULL > > #+end_src > > #+begin_src R :session :exports results > > x > > #+end_src > > > Eric Schulte wrote: >> Hi Paul, >> >> This is on the top of the stack for Babel bug fixes (see [1]), and I >> hope to have a solution pushed up to the git repository soon. I'll >> reply to this email when this issue is resolved. >> >> Thanks -- Eric >> >> Paul Sexton writes: >> >>> #+BEGIN_SRC R :eval query >>> ... >>> #+END_SRC >>> >>> If the above is in an org file, the user runs an export (C-c C-e), and the user >>> types 'no' when asked whether to evaluate the code block, then the whole export >>> process is aborted (no further blocks are processed and no export output is >>> produced). >>> >>> The same thing happens with ':eval never'. >>> >>> Paul >>> >>> >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> Footnotes: [1] >> http://eschulte.github.com/babel-dev/STARTED-How-to-quietly-exclude-block-from-evaluation-.html >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode