GNU bug report logs - #60142
28.1; python.el Incorrect region when python-shell-send-region from indented code

Previous Next

Package: emacs;

Reported by: pmercatoris <mercatorispierre <at> gmail.com>

Date: Sat, 17 Dec 2022 03:35:03 UTC

Severity: normal

Found in version 28.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 60142 <at> debbugs.gnu.org (full text, mbox):

From: kobarity <kobarity <at> gmail.com>
To: Pierre Mercatoris <mercatorispierre <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Augusto Stoffel <arstoffel <at> gmail.com>,
 60142 <at> debbugs.gnu.org
Subject: Re: bug#60142: 28.1; python.el Incorrect region when
 python-shell-send-region from indented code
Date: Mon, 19 Dec 2022 07:25:46 +0900
[Message part 1 (text/plain, inline)]
Pierre Mercatoris <mercatorispierre <at> gmail.com>:

> > ```python
>> > if True:
>> >     if True:
>> >         a = "test"
>> > ```
>> >
>> > If I select the first `True` and `python-shell-send-region`, it will
>> > correctly send it to the consol and print `True`.
>> >
>> > Now if I do the same thing with the second `True` it will throw an
>> > error: `IndentationError: expected an indented block after 'if'
>> > statement on line 1` Although it would also reffer to unexpected block
>> > after `if` even it it were `for`, `try`, ...
>> >
>> > If I select the `a` or `a = "test"` it will correctly send it to the
>> > console, however it won't echo the evaluation of the statement.
>> >
>> > If I select the string "test" and send, it will throw the same error as
>> > the second True.
>
>
Hi,

I could reproduce and workaround the bug.  But could you give me a few more
days to consider well and revise the patch?
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.