From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Extraneous output from Python code blocks using :session option Date: Thu, 12 Mar 2015 17:23:30 -0400 Message-ID: <87bnjxq59p.fsf@kyleam.com> References: <1931A590-8B23-4412-86C7-F3571EC466FF@haas.berkeley.edu> <87r3sv2xra.fsf@kyleam.com> <210D96E7-43E3-4438-8401-7841C6612023@haas.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWAZr-0006nE-Gj for emacs-orgmode@gnu.org; Thu, 12 Mar 2015 17:23:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWAZn-0003gA-G9 for emacs-orgmode@gnu.org; Thu, 12 Mar 2015 17:23:35 -0400 Received: from mail-qg0-f50.google.com ([209.85.192.50]:39890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWAZn-0003g0-CD for emacs-orgmode@gnu.org; Thu, 12 Mar 2015 17:23:31 -0400 Received: by qgdq107 with SMTP id q107so21540199qgd.6 for ; Thu, 12 Mar 2015 14:23:31 -0700 (PDT) In-Reply-To: <210D96E7-43E3-4438-8401-7841C6612023@haas.berkeley.edu> (Richard Stanton's message of "Thu, 12 Mar 2015 08:34:01 -0700") 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: Richard Stanton Cc: emacs-orgmode@gnu.org, John Kitchin Richard Stanton wrote: > This looks great. While we're patching this code, why does having > blank lines inside function definitions cause such problems in > :session mode? I think this is because the lines are being sent one by one, so sending the blank line causes an issue, like typing enter with the cursor at _: >>> def abc(): >>> _ ... File "", line 2 ^ IndentationError: expected an indented block >>> I'll take a look at fixing this. python.el in Emacs 24 seems to send functions with blank lines over fine, so perhaps I can use it as an example. -- Kyle