GNU bug report logs -
#61463
29.0.60; python-shell-send-region moves point
Previous Next
Reported by: Augusto Stoffel <arstoffel <at> gmail.com>
Date: Sun, 12 Feb 2023 21:56:01 UTC
Severity: normal
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 18 Feb 2023 18:45:17 +0200
with message-id <835ybyzzvm.fsf <at> gnu.org>
and subject line Re: bug#61463: 29.0.60; python-shell-send-region moves point
has caused the debbugs.gnu.org bug report #61463,
regarding 29.0.60; python-shell-send-region moves point
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
61463: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61463
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
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.
[Message part 3 (message/rfc822, inline)]
> Cc: 61463 <at> debbugs.gnu.org
> Date: Tue, 14 Feb 2023 00:43:39 +0900
> From: kobarity <kobarity <at> gmail.com>
>
> 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.
This bug report was last modified 2 years and 95 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.