bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61463: 29.0.60; python-shell-send-region moves point


From: kobarity
Subject: bug#61463: 29.0.60; python-shell-send-region moves point
Date: Tue, 14 Feb 2023 00:43:39 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

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.

Attachment: 0001-Fix-point-moving-when-calling-python-shell-send-regi.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]