emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug? org-export-babel-evaluate setting breaks :exports results
@ 2016-09-29 17:23 William Denton
  2016-09-29 20:34 ` Charles C. Berry
  0 siblings, 1 reply; 5+ messages in thread
From: William Denton @ 2016-09-29 17:23 UTC (permalink / raw)
  To: emacs-orgmode

I'm working on a big Org file on a slow machine, so I set 
org-export-babel-evaluate to nil so exporting to PDF just generates the file 
from what's in the buffer, without doing any calculating.

I have a mix of source blocks, and all of a sudden the code began to appear in 
the PDF when all I wanted were the results.  I boiled it down to the example 
below.  If you save that to a file, load it, ~C-c C-e l o RET~ to export to PDF, 
you will see the ls command and the output, even though the setting is ":exports 
results".

Now delete the org-export-babel-evaluate line, ~C-x C-v RET~ to reload the 
file and pick up the new setting, then export to PDF.  You will not see the ls 
command, just the output.

###### BEGIN
# -*- org-export-babel-evaluate: nil -*-

#+BEGIN_SRC shell :results value :exports results
ls /etc | wc -l
#+END_SRC

#+RESULTS:
: 307
###### END

I'm not sure what's happening, but it seems like a bug.

(This is on Emacs 25.2.50.2 with Org compiled from source today, up to 
Nicolas's 2b22d503e1ee83f3a2681964f9de8405438a6385 commit yesterday).

Bill
-- 
William Denton :: Toronto, Canada :: https://www.miskatonic.org/
Caveat lector.

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

* Re: Bug? org-export-babel-evaluate setting breaks :exports results
  2016-09-29 17:23 Bug? org-export-babel-evaluate setting breaks :exports results William Denton
@ 2016-09-29 20:34 ` Charles C. Berry
  2016-10-01 19:10   ` Grant Rettke
  2016-10-04  1:22   ` William Denton
  0 siblings, 2 replies; 5+ messages in thread
From: Charles C. Berry @ 2016-09-29 20:34 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

On Thu, 29 Sep 2016, William Denton wrote:

> I'm working on a big Org file on a slow machine, so I set 
> org-export-babel-evaluate to nil so exporting to PDF just generates the file 
> from what's in the buffer, without doing any calculating.
>

Actually it does a lot LESS than that.

The docstring notes that:

"When set to nil no code will be evaluated as part of the export
process and no header argumentss will be obeyed."

and advises:

"Users who wish to avoid evaluating code on export should use the header
argument ‘:eval never-export’."

which sounds like what you wanted.

Chuck

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

* Re: Bug? org-export-babel-evaluate setting breaks :exports results
  2016-09-29 20:34 ` Charles C. Berry
@ 2016-10-01 19:10   ` Grant Rettke
  2016-10-04  1:22   ` William Denton
  1 sibling, 0 replies; 5+ messages in thread
From: Grant Rettke @ 2016-10-01 19:10 UTC (permalink / raw)
  To: Charles C. Berry; +Cc: William Denton, emacs-orgmode@gnu.org

This setting is one of the gems for developing a personal workflow.

My workflow is to never evaluate during export because I want the
document to serve as the "master" or the "one source of truth" that is
stored in version control.

The other perspective is never to store it which is what some people want, too!
Sincerely,

Grant Rettke


On Thu, Sep 29, 2016 at 3:34 PM, Charles C. Berry <ccberry@ucsd.edu> wrote:
> On Thu, 29 Sep 2016, William Denton wrote:
>
>> I'm working on a big Org file on a slow machine, so I set
>> org-export-babel-evaluate to nil so exporting to PDF just generates the file
>> from what's in the buffer, without doing any calculating.
>>
>
> Actually it does a lot LESS than that.
>
> The docstring notes that:
>
> "When set to nil no code will be evaluated as part of the export
> process and no header argumentss will be obeyed."
>
> and advises:
>
> "Users who wish to avoid evaluating code on export should use the header
> argument ‘:eval never-export’."
>
> which sounds like what you wanted.
>
> Chuck

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

* Re: Bug? org-export-babel-evaluate setting breaks :exports results
  2016-09-29 20:34 ` Charles C. Berry
  2016-10-01 19:10   ` Grant Rettke
@ 2016-10-04  1:22   ` William Denton
  2016-10-04  2:49     ` Grant Rettke
  1 sibling, 1 reply; 5+ messages in thread
From: William Denton @ 2016-10-04  1:22 UTC (permalink / raw)
  To: Charles C. Berry; +Cc: emacs-orgmode

On 29 September 2016, Charles C. Berry wrote:

>> I'm working on a big Org file on a slow machine, so I set 
>> org-export-babel-evaluate to nil so exporting to PDF just generates the 
>> file from what's in the buffer, without doing any calculating.
>
> Actually it does a lot LESS than that.

My sincere thanks for pointing this out.

I spent an hour narrowing down the problem to one variable, but then didn't read 
the documentation on it.  To help myself remember to try to never do this again, 
I wrote it up:

https://www.miskatonic.org/2016/10/03/orgexportbabelevaluate/

There's always something new to learn in Org---and something new to be learned 
from this mailing list.

Bill
-- 
William Denton :: Toronto, Canada :: https://www.miskatonic.org/
Caveat lector.

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

* Re: Bug? org-export-babel-evaluate setting breaks :exports results
  2016-10-04  1:22   ` William Denton
@ 2016-10-04  2:49     ` Grant Rettke
  0 siblings, 0 replies; 5+ messages in thread
From: Grant Rettke @ 2016-10-04  2:49 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode@gnu.org, Charles C. Berry

On Mon, Oct 3, 2016 at 8:22 PM, William Denton <wtd@pobox.com> wrote:
> There's always something new to learn in Org---and something new to be
> learned from this mailing list.

Never evaluating on export or tangle is my favorite way, too:

https://www.wisdomandwonder.com/article/10400/the-fifteen-questions-that-you-must-answer-in-your-org-mode-literate-programming-configuration

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

end of thread, other threads:[~2016-10-04  2:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 17:23 Bug? org-export-babel-evaluate setting breaks :exports results William Denton
2016-09-29 20:34 ` Charles C. Berry
2016-10-01 19:10   ` Grant Rettke
2016-10-04  1:22   ` William Denton
2016-10-04  2:49     ` Grant Rettke

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