emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Herbert Sitz <hsitz@nwlink.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-babel -- Improper syntax error in session mode?
Date: Mon, 27 Jun 2011 18:22:39 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110627T201022-778@post.gmane.org> (raw)
In-Reply-To: 871uynkqjq.fsf@gmail.com

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

> You are suggesting that code to be run "interactively" should be written
> to an external file then loaded into the interactive session.  

Generally, yes, because babel's definition of "interactive" (execute an
arbitrary collection of code lines all at once) is different from an interactive
shell session's (execute a single statement of statement block at a time, giving
output after each).

> This
> would certainly work around the syntax limitation of the current setup.
> My two concerns here are that
> 
> 1. users who use interactive babel blocks side-by-side with the session
>    may be used jumping into the session to play with code interactively
>    and debug, in such cases rather than seeing their code in the session
>    history they would only see execfile('/tmp/blahblah').  Note I do
>    recall discussion on list related to user's reading their session
>    code in the inferior session buffer.

I see your point, that's a valuable tool.  Ideally, it seems to me, the session
blocks could be evaluated _either_ "interactively" (with a history in shell
session) or as a block-as-a-whole.  Having a named session (e.g., ':session
debug') designated to use the interactive mode and other :sessions use
"non-interactive" mode would be one way to do this.

> 2. similarly error messages would now point into this temporary file,
>    rather than back into the session history

I think the ':session debug' behavior in paragraph above could get around this.
 (I think there are also ways to feed the source lines through <stdin> but that
doesn't get around your issue 2., anyway.)

> 
> Basically you would prefer more decoupling from the interpreter and I'm
> not sure for the average user if this would be a worthwhile exchange
> simply to be able to avoid syntax errors like your originally mentioned
> example (which was the first such post I've seen on this list).
> 
> I'm disinclined to make such a change without a wider base of support
> for the request from the Babel/Python user community -- or at least
> without more complaints about the existing behavior.
> 

Yeah, I completely get you here.  If there are no other complaints about
existing behavior, and with limited resources, there's no good reason to change
things.

Regards,

Herb

  reply	other threads:[~2011-06-27 18:22 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
2011-06-27 18:09                         ` Herbert Sitz
2011-06-21 17:26                   ` Eric Schulte
2011-06-27 18:22                     ` Herbert Sitz [this message]
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=loom.20110627T201022-778@post.gmane.org \
    --to=hsitz@nwlink.com \
    --cc=emacs-orgmode@gnu.org \
    /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).