Subject: Re: bug#39398: 26.3; `python-shell-buffer-substring` does not respect region

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 28 Oct 2020 09:34:48 +0100

Glenn Morris <[email-masked]> writes:

> This causes the tests that were added for https://debbugs.gnu.org/21086
> to fail.

This should now be fixed.

It's debatable, I guess, whether the old or the new `C-c C-r' behaviour
makes sense.  I think the command should do what it says: Send the
region to the python process...  but that means that the region should
be valid.  For instance:

if 1:
    print foo()

Sending "print foo()" is not valid; you need the entire line (because of
the True wrapping).  But that means that it's impossible to send
something later on the line, like just "foo()" (which is valid).

So we could revert the new patch and go back to the "send the entire
line" behaviour, but then we should actually document it at least.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no