emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Herbert Sitz <hsitz@nwlink.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-babel -- Improper syntax error in session mode?
Date: Tue, 21 Jun 2011 10:52:13 -0700	[thread overview]
Message-ID: <87pqm7jbz1.fsf@gmail.com> (raw)
In-Reply-To: loom.20110621T165605-813@post.gmane.org

Herbert Sitz <hsitz@nwlink.com> writes:

> Thomas S. Dye <tsd <at> tsdye.com> writes:
>> 
>> Aloha Herbert,
>> 
>> I think you're right about the potential to improve the documentation.
>> That's an on-going process.  Could you suggest some specific changes?
>> 
>> All the best,
>> Tom
>
> Tom -- 
>
> I would suggest just adding specific warnings that session-based evaluation may
> throw syntax errors with valid code.
>

Done.

I've added such a warning -- although not as strongly stated as your suggestion

>
[...]
>
> Also, it seems the real power of :session evaluation is to share state between
> Org/Babel source code blocks, not merely to act as a kind of Org-internal
> scratchpad.  As a user trying to take advantage of that state-sharing power I
> would generally want my Org document exports to start from fresh sessions.  That
> is, I would write my :session blocks so that they depended on results of code
> run in previous :session blocks, BUT I would want the first :session block to
> start with a fresh session,with a known state.   So on export I would generally
> want any existing named session to be closed and restarted anew for an 
> Org export.
>

There are times when I explicitly do not want a session to start fresh.
Generally this is related to caching, for example if I have some value
which is expensive (say a couple of minutes of computation) to compute,
and it is currently alive in the session, then I'd probably rather keep
my session active across multiple exports as I'm working on other (say
visual/prose tweaks) to the exported document.

Does that make sense?

If the user did want to refresh the session on _every_ export I believe
they could add such a function to the `org-export-preprocess-hook'.

Cheers -- Eric

>
> I hope that all makes sense.  I should say I'm not a big Babel user, and I could
> easily be misunderstanding something.  But it seems this is the way the
> :session-based stuff should work, when possible.
>
> -- Herb
>
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

  parent reply	other threads:[~2011-06-21 18:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-19 21:54 org-babel -- Improper syntax error in session mode? Herbert Sitz
2011-06-19 23:21 ` Eric Schulte
2011-06-20  1:59   ` Herbert Sitz
2011-06-20  2:12   ` Herbert Sitz
2011-06-20  3:17     ` Nick Dokos
2011-06-20  3:46       ` Herbert Sitz
2011-06-20 19:23       ` Eric Schulte
2011-06-20 20:45         ` Herbert Sitz
2011-06-20 21:15           ` Eric Schulte
2011-06-20 23:16             ` Herbert Sitz
2011-06-21  0:08               ` Nick Dokos
2011-06-21  0:27                 ` Herbert Sitz
     [not found]                   ` <hesitz@gmail.com>
2011-06-21  1:17                     ` Nick Dokos
2011-06-21  2:19               ` Eric Schulte
2011-06-21  5:13                 ` Herbert Sitz
2011-06-21  7:15                   ` Thomas S. Dye
2011-06-21 15:35                     ` Herbert Sitz
2011-06-21 16:27                       ` Thomas S. Dye
2011-06-21 17:42                         ` Eric Schulte
2011-06-21 17:51                         ` Herbert Sitz
2011-06-21 17:52                       ` Eric Schulte [this message]
2011-06-27 18:09                         ` Herbert Sitz
2011-06-21 17:26                   ` Eric Schulte
2011-06-27 18:22                     ` Herbert Sitz
2011-06-20 21:18     ` Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pqm7jbz1.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hsitz@nwlink.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).