emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: export aborts if ':eval query/never' in source code blocks
@ 2010-08-26 20:11 Paul Sexton
  2010-08-26 20:19 ` Erik Iverson
  2010-08-26 21:27 ` Eric Schulte
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Sexton @ 2010-08-26 20:11 UTC (permalink / raw)
  To: emacs-orgmode

#+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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: export aborts if ':eval query/never' in source code blocks
  2010-08-26 20:11 Bug: export aborts if ':eval query/never' in source code blocks Paul Sexton
@ 2010-08-26 20:19 ` Erik Iverson
  2010-08-26 21:27 ` Eric Schulte
  1 sibling, 0 replies; 7+ messages in thread
From: Erik Iverson @ 2010-08-26 20:19 UTC (permalink / raw)
  To: Paul Sexton; +Cc: emacs-orgmode

Which version of org-mode? I can't replicate on git version from
minutes ago..

Paul Sexton wrote:
> #+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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: export aborts if ':eval query/never' in source code blocks
  2010-08-26 20:11 Bug: export aborts if ':eval query/never' in source code blocks Paul Sexton
  2010-08-26 20:19 ` Erik Iverson
@ 2010-08-26 21:27 ` Eric Schulte
  2010-08-26 21:56   ` Erik Iverson
  2010-08-26 23:17   ` Eric Schulte
  1 sibling, 2 replies; 7+ messages in thread
From: Eric Schulte @ 2010-08-26 21:27 UTC (permalink / raw)
  To: Paul Sexton; +Cc: emacs-orgmode

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 <psexton@xnet.co.nz> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: export aborts if ':eval query/never' in source code blocks
  2010-08-26 21:27 ` Eric Schulte
@ 2010-08-26 21:56   ` Erik Iverson
  2010-08-26 23:22     ` Eric Schulte
  2010-08-26 23:17   ` Eric Schulte
  1 sibling, 1 reply; 7+ messages in thread
From: Erik Iverson @ 2010-08-26 21:56 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode, Paul Sexton

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?

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 <psexton@xnet.co.nz> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: export aborts if ':eval query/never' in source code blocks
  2010-08-26 21:27 ` Eric Schulte
  2010-08-26 21:56   ` Erik Iverson
@ 2010-08-26 23:17   ` Eric Schulte
  2010-08-27  1:31     ` Paul Sexton
  1 sibling, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2010-08-26 23:17 UTC (permalink / raw)
  To: Paul Sexton; +Cc: emacs-orgmode

I've just pushed up a fix for this issue. For more information see
http://eschulte.github.com/babel-dev/DONE-eval-and-noeval.html

Cheers -- Eric

"Eric Schulte" <schulte.eric@gmail.com> writes:

> 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 <psexton@xnet.co.nz> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: export aborts if ':eval query/never' in source code blocks
  2010-08-26 21:56   ` Erik Iverson
@ 2010-08-26 23:22     ` Eric Schulte
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Schulte @ 2010-08-26 23:22 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode, Paul Sexton

Hi Erik,

Erik Iverson <eriki@ccbr.umn.edu> 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 <psexton@xnet.co.nz> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug: export aborts if ':eval query/never' in source code blocks
  2010-08-26 23:17   ` Eric Schulte
@ 2010-08-27  1:31     ` Paul Sexton
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Sexton @ 2010-08-27  1:31 UTC (permalink / raw)
  To: emacs-orgmode

Eric Schulte <schulte.eric <at> gmail.com> writes:

> 
> I've just pushed up a fix for this issue. For more information see
> http://eschulte.github.com/babel-dev/DONE-eval-and-noeval.html

Wow, that was fast!
Thanks very much.

Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-27  1:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-26 20:11 Bug: export aborts if ':eval query/never' in source code blocks Paul Sexton
2010-08-26 20:19 ` Erik Iverson
2010-08-26 21:27 ` Eric Schulte
2010-08-26 21:56   ` Erik Iverson
2010-08-26 23:22     ` Eric Schulte
2010-08-26 23:17   ` Eric Schulte
2010-08-27  1:31     ` Paul Sexton

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).