all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Jack Kamm <jackkamm@gmail.com>
Cc: "Dr. Arne Babenhauserheide" <arne_bab@web.de>,
	"Rudolf Adamkovič" <rudolf@adamkovic.org>,
	emacs-orgmode@gnu.org
Subject: Re: Org Babel says 1 + 1 in Python is None
Date: Sun, 20 Oct 2024 09:39:54 +0000	[thread overview]
Message-ID: <8734krru39.fsf@localhost> (raw)
In-Reply-To: <87bjzf45g5.fsf@gmail.com>

Jack Kamm <jackkamm@gmail.com> writes:

>>> So I think WORG needs to be fixed.
>>>
>>> Can you send a patch?
>>> https://git.sr.ht/~bzg/worg
>>
>> Yes, patch would be welcome.
>
> As Sebastian mentioned, Worg already documents the behavior, under the
> section "Return values":
>
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html#org6eb75c6

Right.
Then, I see nothing else that can be done on Org side.

I'm afraid that trying to replicate Python REPL behavior for
non-interactive src blocks will be beyond what we can reasonably do in
Org: we would somehow need to detect the last statement in the src
blocks, which may or may not span a single line; and multiline statements
will need to use some kind of Python parser. All this sounds way too
fragile to be practical.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2024-10-20  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 13:33 Org Babel says 1 + 1 in Python is None Rudolf Adamkovič
2024-09-07  8:12 ` Dr. Arne Babenhauserheide
2024-10-13 11:41   ` Ihor Radchenko
2024-10-20  7:08     ` Jack Kamm
2024-10-20  9:39       ` Ihor Radchenko [this message]
2024-10-21  6:00         ` Jack Kamm
2024-10-21 18:03           ` Ihor Radchenko
2024-10-22  2:43             ` Jack Kamm
2024-10-23 17:13               ` Ihor Radchenko
2024-09-07  9:27 ` Sébastien Gendre
2024-10-28 22:25   ` Rudolf Adamkovič

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734krru39.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=arne_bab@web.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=jackkamm@gmail.com \
    --cc=rudolf@adamkovic.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.