From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61463: 29.0.60; python-shell-send-region moves point Date: Sat, 18 Feb 2023 18:45:17 +0200 Message-ID: <835ybyzzvm.fsf@gnu.org> References: <87pmaeo8g4.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36483"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61463-done@debbugs.gnu.org, arstoffel@gmail.com To: kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 18 17:46:25 2023 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 1pTQLw-0009HS-RP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Feb 2023 17:46:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTQLc-000158-HS; Sat, 18 Feb 2023 11:46:04 -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 1pTQLa-00012S-Vi for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 11:46: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 1pTQLa-0004py-MM for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 11:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTQLa-0003XZ-Ix for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 11:46:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2023 16:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 61463 X-GNU-PR-Package: emacs Mail-Followup-To: 61463@debbugs.gnu.org, eliz@gnu.org, arstoffel@gmail.com Original-Received: via spool by 61463-done@debbugs.gnu.org id=D61463.167673873513562 (code D ref 61463); Sat, 18 Feb 2023 16:46:02 +0000 Original-Received: (at 61463-done) by debbugs.gnu.org; 18 Feb 2023 16:45:35 +0000 Original-Received: from localhost ([127.0.0.1]:44794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTQL8-0003Wg-Oh for submit@debbugs.gnu.org; Sat, 18 Feb 2023 11:45:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTQL7-0003WT-1h for 61463-done@debbugs.gnu.org; Sat, 18 Feb 2023 11:45:33 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTQL1-0004T9-Q4; Sat, 18 Feb 2023 11:45:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MDW8krtA/AhhrYksg7Msboh973P6PJ6Ftx6avAU1z3I=; b=AMrNj39Zd7ll Fa8jdp2398la+9dX0pUHJz5H9Ix4CXNm2/3TVW/ij6JzsIm0hRv5EZY5QTSUETMXnpIGI287na9PQ twxkOIQdfiA3zE9ne2g5yJYajEM5W+aQa4bal4on50bu0p9XFsF+Mc7H6bOJ9E3Z0jOvrZhE86f6Y iASy1jgBDvw6MkKWkiURKEZVsoYxDFH8qKFOG9AUV9PZ0CGod0V2gtKnkNnwVOry49J1x0jAsmgQb aiBruJyOgiwUkbE5cm+rdPKFu7sr4N1WoFi4lIZgnhQGacd8knXU3XzeDH7n6Dv9JlOtBfaEzIQ8x FnVNiFWPIj/PYbvAi1fNaQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTQL0-0001tZ-IK; Sat, 18 Feb 2023 11:45:27 -0500 In-Reply-To: (message from kobarity on Tue, 14 Feb 2023 00:43:39 +0900) 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:255973 Archived-At: > Cc: 61463@debbugs.gnu.org > Date: Tue, 14 Feb 2023 00:43:39 +0900 > From: kobarity > > Augusto Stoffel wrote: > > On Emacs -Q: > > > > 1) M-x run-python > > 2) In the scratch buffer, type something, say 1 + 2 and mark it, leaving > > point at the end. > > 3) M-x python-shell-send-string > > Probably a typo of python-shell-send-region. > > > Now the point is at the beginning of the region. It was supposed not to > > move. > > > > I suspect this might be due to a missing `save-excursion' in the > > definition of the local variable `single-p' in python.el. > > Thank you for pointing that out. You are right, `single-p' needs > `save-excursion'. The same bug exists in `starts-at-first-line-p'. > I'm sorry for those bugs. > > Atatched is a fix for this problem with improved ERTs to detect this > issue. Thanks, installed on the emacs-29 branch, and closing the bug.