all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-mode export behavior change in 9.2?
@ 2019-01-12  1:03 Haider Rizvi
  2019-01-12 18:24 ` Berry, Charles
  0 siblings, 1 reply; 4+ messages in thread
From: Haider Rizvi @ 2019-01-12  1:03 UTC (permalink / raw)
  To: emacs-orgmode

I've been using literate programming approach with org-babel for a
while. I just noticed that with 9.2, when I try to export (c-c c-e h
o) an org doc / section, any shell blocks with a named session are
executed as it is exporting to html!

I don't think it was this way before?  Is there a way to not have it
execute each shell block when trying to export.

I just tested it with this small .org document. On osx, /usr/bin/say
speaks out the arguments.

-------------------------
#+begin_src shell :session sh-pcnw3
/usr/bin/say something         # say it out loud!
#+end_src
-------------------------

Without the :session, it doesn't!

-- 

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

* Re: org-mode export behavior change in 9.2?
  2019-01-12  1:03 org-mode export behavior change in 9.2? Haider Rizvi
@ 2019-01-12 18:24 ` Berry, Charles
  2019-01-12 21:33   ` Haider Rizvi
  0 siblings, 1 reply; 4+ messages in thread
From: Berry, Charles @ 2019-01-12 18:24 UTC (permalink / raw)
  To: Haider Rizvi; +Cc: org-mode-email



> On Jan 11, 2019, at 5:03 PM, Haider Rizvi <harizvi@gmail.com> wrote:
> 
> I've been using literate programming approach with org-babel for a
> while. I just noticed that with 9.2, when I try to export (c-c c-e h
> o) an org doc / section, any shell blocks with a named session are
> executed as it is exporting to html!
> 
> I don't think it was this way before?

 
AFAICS, nothing has changed in the way :session is handled for shell src blocks in a very long time. 

Perhaps, you had set `:eval never-export' previously, but not now. ??

>  Is there a way to not have it
> execute each shell block when trying to export.

This seems to work as you would want:

#+begin_src shell :session sh-pcnw3 :eval never-export
/usr/bin/say something         # say it out loud!
#+end_src


If you can identify a release in which the behavior was as you said, it might be possible to dig deeper.

HTH,

Chuck

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

* Re: org-mode export behavior change in 9.2?
  2019-01-12 18:24 ` Berry, Charles
@ 2019-01-12 21:33   ` Haider Rizvi
  2019-01-13 17:29     ` Berry, Charles
  0 siblings, 1 reply; 4+ messages in thread
From: Haider Rizvi @ 2019-01-12 21:33 UTC (permalink / raw)
  To: emacs-orgmode

"Berry, Charles" <ccberry@ucsd.edu> writes:

>> On Jan 11, 2019, at 5:03 PM, Haider Rizvi <harizvi@gmail.com> wrote:
>> 
>> I've been using literate programming approach with org-babel for a
>> while. I just noticed that with 9.2, when I try to export (c-c c-e h
>> o) an org doc / section, any shell blocks with a named session are
>> executed as it is exporting to html!
>> 
>> I don't think it was this way before?
>
>  
> AFAICS, nothing has changed in the way :session is handled for shell src blocks in a very
> long time.
>
> Perhaps, you had set `:eval never-export' previously, but not now. ??
>
>>  Is there a way to not have it
>> execute each shell block when trying to export.
>
> This seems to work as you would want:
>
> #+begin_src shell :session sh-pcnw3 :eval never-export
> /usr/bin/say something         # say it out loud!
> #+end_src
>
>
> If you can identify a release in which the behavior was as you said, it might be possible to
> dig deeper.

Chuck, thanks for responding.

I've never had the never-export set. I'll try to go back and pinpoint
when the change shows up if I can.

Is the difference between named session and without it expected? With
the named session, the block is executed on export, and without it, it
is not executed!

-- 

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

* Re: org-mode export behavior change in 9.2?
  2019-01-12 21:33   ` Haider Rizvi
@ 2019-01-13 17:29     ` Berry, Charles
  0 siblings, 0 replies; 4+ messages in thread
From: Berry, Charles @ 2019-01-13 17:29 UTC (permalink / raw)
  To: Haider Rizvi; +Cc: org-mode-email



> On Jan 12, 2019, at 1:33 PM, Haider Rizvi <harizvi@gmail.com> wrote:
> 
> "Berry, Charles" <ccberry@ucsd.edu> writes:
> 
>>> On Jan 11, 2019, at 5:03 PM, Haider Rizvi <harizvi@gmail.com> wrote:
>>> 
>>> I've been using literate programming approach with org-babel for a
>>> while. I just noticed that with 9.2, when I try to export (c-c c-e h
>>> o) an org doc / section, any shell blocks with a named session are
>>> executed as it is exporting to html!
>>> 
>>> I don't think it was this way before?
>> 
>> 
>> AFAICS, nothing has changed in the way :session is handled for shell src blocks in a very
>> long time.
>> 
>> Perhaps, you had set `:eval never-export' previously, but not now. ??
>> 
>>> Is there a way to not have it
>>> execute each shell block when trying to export.
>> 
>> This seems to work as you would want:
>> 
>> #+begin_src shell :session sh-pcnw3 :eval never-export
>> /usr/bin/say something         # say it out loud!
>> #+end_src
>> 
>> 
>> If you can identify a release in which the behavior was as you said, it might be possible to
>> dig deeper.
> 
> Chuck, thanks for responding.
> 
> I've never had the never-export set. I'll try to go back and pinpoint
> when the change shows up if I can.
> 
> Is the difference between named session and without it expected? With
> the named session, the block is executed on export, and without it, it
> is not executed!


With the default `:exports code' (your case) or with `:exports none' the difference is expected. You can read `org-babel-exp-do-export' for details.

If I were you I wouldn't spend much time trying to run this down.  I'd just use `:eval never-export'.  It seems like that is the behavior you want.


Chuck

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

end of thread, other threads:[~2019-01-13 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-12  1:03 org-mode export behavior change in 9.2? Haider Rizvi
2019-01-12 18:24 ` Berry, Charles
2019-01-12 21:33   ` Haider Rizvi
2019-01-13 17:29     ` Berry, Charles

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.