emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Tobias Müller" <mllertobias@gmx.de>
To: emacs-orgmode@gnu.org
Subject: Re: Bug: Python session raises indentation error [9.2.6 (9.2.6-elpa @ /home/tobias/.emacs.d/elpa/org-9.2.6/)]
Date: Mon, 14 Oct 2019 20:24:27 +0200	[thread overview]
Message-ID: <611c2df4-dd48-e0f3-aef9-72f04d41619a@gmx.de> (raw)
In-Reply-To: <8bc94355-0c14-4b43-b060-7dd4db42f32b@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]

Dear, org-mode developer,

I was not aware of the fact, that new lines are special in interactive
mode and indicate the end of an indented block (I have just found out
about that in the babel documentation for python). Therefore the issue
which I have reported is probably not a bug but rather an expected
behavior. Please excuse me for positing a false bug report.

Best regards,
Tobias Müller.

Am 14.10.19 um 19:55 schrieb Tobias Müller:
>
> Dear org-mode developer,
>
> I have discovered the following issue with Python code-blocks: Using
> the :session header argument leads to errors of the type
> IndentationError: expected an indented block if the code block
> contains indented regions with empty lines. An example code-block
> which produces this kind of error is the following:
>
> #+begin_src python :session
>    for k in range(3):
>
>        print(k)
> #+end_src
>
> removing the :session header argument leads to correct execution of
> the code block. The same is true if the :results output header
> argument is used.
>
> If the blank line within the for-loop is removed the loop also gets
> executed correctly, however after executing the block the error
> NameError: name '_' is not defined is raised in the buffer of the
> Python session.
>
> The generated info-file is attached to this mail.
>
> Best regards,
> Tobias Müller.
>

[-- Attachment #2: Type: text/html, Size: 2085 bytes --]

      reply	other threads:[~2019-10-14 18:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 17:55 Bug: Python session raises indentation error [9.2.6 (9.2.6-elpa @ /home/tobias/.emacs.d/elpa/org-9.2.6/)] Tobias Müller
2019-10-14 18:24 ` Tobias Müller [this message]

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=611c2df4-dd48-e0f3-aef9-72f04d41619a@gmx.de \
    --to=mllertobias@gmx.de \
    --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).