From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] ob-python: Insert necessary blank line when sending code to interpreter Date: Mon, 02 Apr 2018 20:56:09 +0200 Message-ID: <871sfx1lpy.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f34cq-000367-Pr for Emacs-orgmode@gnu.org; Mon, 02 Apr 2018 14:56:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f34cn-0004Bw-Ol for Emacs-orgmode@gnu.org; Mon, 02 Apr 2018 14:56:16 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:57171) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f34cn-0004BH-IW for Emacs-orgmode@gnu.org; Mon, 02 Apr 2018 14:56:13 -0400 In-Reply-To: (qijian gong's message of "Mon, 02 Apr 2018 02:21:34 +0000") 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" To: qijian gong Cc: Emacs-orgmode@gnu.org Hello, qijian gong writes: > I've written this patch to fix the syntax error alarm caused by evaluating > the following code block: > > #+BEGIN_SRC python :session > if True: > 1 > 2 > #+END_SRC Thank you. Could you add a test in "test-ob-python.el"? Could you also add a comment explaining what you are doing? > + (let ((curr-indent (string-match "[^\s]" line))) (string-match "\\S-" line) Regards, -- Nicolas Goaziou