From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: kobarity Newsgroups: gmane.emacs.bugs Subject: 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-ID: References: <83mt7lf12y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c81a9e05f021af4f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17753"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Augusto Stoffel , 60142@debbugs.gnu.org To: Pierre Mercatoris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 18 23:27:19 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p727r-0004Uu-IB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Dec 2022 23:27:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p727b-0004FX-Sk; Sun, 18 Dec 2022 17:27:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p727a-0004FF-Ah for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 17:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p727a-0006wE-2d for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 17:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p727Z-0008Bl-JT for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 17:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Dec 2022 22:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60142 X-GNU-PR-Package: emacs Original-Received: via spool by 60142-submit@debbugs.gnu.org id=B60142.167140238031444 (code B ref 60142); Sun, 18 Dec 2022 22:27:01 +0000 Original-Received: (at 60142) by debbugs.gnu.org; 18 Dec 2022 22:26:20 +0000 Original-Received: from localhost ([127.0.0.1]:36254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p726u-0008B6-7s for submit@debbugs.gnu.org; Sun, 18 Dec 2022 17:26:20 -0500 Original-Received: from mail-qk1-f177.google.com ([209.85.222.177]:34427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p726d-0008Ah-8y for 60142@debbugs.gnu.org; Sun, 18 Dec 2022 17:26:18 -0500 Original-Received: by mail-qk1-f177.google.com with SMTP id pe2so3034268qkn.1 for <60142@debbugs.gnu.org>; Sun, 18 Dec 2022 14:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4Jrzc42XiWFWFz62RsYESwJMqkmnOnovZqNq6KJpgEg=; b=B2ALKdKYe46V6odvvUBNWDpoKde+WK+izGMUI8skrIDrJbJUwtZhskEDGfwuyaMYQ9 P1pj6/+0OmMhrYBv+4M7s1z83/Yqwhvc+fd8+2ddg+1YdMxq1Xwl5hUqewSS3pmBA3lu CbzqqY/FHsWnqOzTHGKRMwG8PLqFPRhhEBsj4coGcmu/5sw5aeQgjPYVMsD+AZUTIhUY Rhp6szU/YlPHR+fc2TIdmJgRPiurqZYLTFsp7buXy6ID2fPkPxZG5e/CawJe40Fkb/ie QWnev8TtdxSBTvduyuOR85KDvD5fNGiQhy/BGL+2k4j13CnM9Hzz7iBqLuRdzNgktsbl Givw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4Jrzc42XiWFWFz62RsYESwJMqkmnOnovZqNq6KJpgEg=; b=7DrRFxvCHuEiYhQSRwlKfYtx+RpZsShK0RGN/z3lBC/hZ/fXdu0cD3kAGJaPny2h27 14W3Urof5c+et2qQ1GN8j+v1E4Ng0KCwEpmpu7jKE06v0Z9rUnSgWbqKz2BAg1fhSI7O mvtXpGtIRKxKU22ykCMj1qwEKUMxMb7/H3yE3PBuu8riAzg6eQqxVf3ixgCi0gFZYX7B D4euOp6FkzYjPh6bSq3LZD2S0+xcwNfgy1V7h2HTkWnegIVpP/8vj/9oiV3wKUhhrl5E MFj6wNQLv6gDQUSDXwwnoEM1vrzhDpvaayCVya5NQrQtWqEnBpObGWnoY32bYMgQYnP0 ZOjg== X-Gm-Message-State: AFqh2kp5fU1epWZWn2g+GnV43gi5DFbPgj0qsRKCFRwquCprwYkGYPIk cvoxM4zkW14QXBCCdwrMEdN7iaTE0UvhpLvSv5c= X-Google-Smtp-Source: AMrXdXugVSz0IgylcCW0mlmK3JEOpPUiC1Xr0CRBVNo+jWQcSfZwVYWRC2g4KtAoTfm5IUCqfNEUKSdT2REDm0aey5g= X-Received: by 2002:a37:640e:0:b0:702:1765:8f38 with SMTP id y14-20020a37640e000000b0070217658f38mr659991qkb.608.1671402357265; Sun, 18 Dec 2022 14:25:57 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251380 Archived-At: --000000000000c81a9e05f021af4f Content-Type: text/plain; charset="UTF-8" Pierre Mercatoris : > > ```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? --000000000000c81a9e05f021af4f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Pierre Mercatoris <mercatorispierre@gmail.com&g= t;:
> ```python
> if True:
>=C2=A0 =C2=A0 =C2=A0if True:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0a =3D "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 =3D "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 sa= me error as
> the second True.

Hi,

I could reproduce and workaround the bug.=C2=A0 But c= ould you give me a few more days to consider well and revise the patch?

--000000000000c81a9e05f021af4f--