From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Sitz Subject: Re: org-babel -- Improper syntax error in session mode? Date: Mon, 27 Jun 2011 18:22:39 +0000 (UTC) Message-ID: References: <87k4chwgpa.fsf@gmail.com> <23747.1308539849@alphaville.dokosmarshall.org> <87ei2ouwxk.fsf@gmail.com> <87aadcxl05.fsf@gmail.com> <87fwn4vsd6.fsf@gmail.com> <871uynkqjq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbGST-0002NL-43 for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 14:22:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbGSR-00037K-R2 for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 14:22:53 -0400 Received: from lo.gmane.org ([80.91.229.12]:37251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbGSR-00037A-Cw for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 14:22:51 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QbGSQ-0006EA-7w for emacs-orgmode@gnu.org; Mon, 27 Jun 2011 20:22:50 +0200 Received: from c-24-22-131-140.hsd1.wa.comcast.net ([24.22.131.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Jun 2011 20:22:50 +0200 Received: from hsitz by c-24-22-131-140.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Jun 2011 20:22:50 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Eric Schulte 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 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