GNU bug report logs -
#70609
30.0.50; [PATCH] New function 'python-shell-send-block' for python-mode
Previous Next
To reply to this bug, email your comments to 70609 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70609
; Package
emacs
.
(Sat, 27 Apr 2024 14:16:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lin Sun <sunlin7.mail <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 27 Apr 2024 14:16:07 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Here is a function 'python-shell-send-block' to send a block to the
python interpreter in python mode, it's similar to
`python-shell-send-defun` but works on block.
The implementation and testing are included in that patch.
Please help review the changes.
[PATCH] New function 'python-shell-send-block' for python-mode
* lisp/progmodes/python.el: Add implemention of the function.
* test/lisp/progmodes/python-tests.el: Test case for the function.
* etc/NEWS: Document for the function.
Best Regards
Lin
[0001-New-function-python-shell-send-block-for-python-mode.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70609
; Package
emacs
.
(Mon, 29 Apr 2024 12:58:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 70609 <at> debbugs.gnu.org (full text, mbox):
> From: Lin Sun <sunlin7.mail <at> gmail.com>
> Date: Sat, 27 Apr 2024 14:14:06 +0000
>
> Here is a function 'python-shell-send-block' to send a block to the
> python interpreter in python mode, it's similar to
> `python-shell-send-defun` but works on block.
>
> The implementation and testing are included in that patch.
>
> Please help review the changes.
>
> [PATCH] New function 'python-shell-send-block' for python-mode
>
> * lisp/progmodes/python.el: Add implemention of the function.
> * test/lisp/progmodes/python-tests.el: Test case for the function.
> * etc/NEWS: Document for the function.
kobarity, any comments?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70609
; Package
emacs
.
(Tue, 30 Apr 2024 07:30:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 70609 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii wrote:
>
> > From: Lin Sun <sunlin7.mail <at> gmail.com>
> > Date: Sat, 27 Apr 2024 14:14:06 +0000
> >
> > Here is a function 'python-shell-send-block' to send a block to the
> > python interpreter in python mode, it's similar to
> > `python-shell-send-defun` but works on block.
> >
> > The implementation and testing are included in that patch.
> >
> > Please help review the changes.
> >
> > [PATCH] New function 'python-shell-send-block' for python-mode
> >
> > * lisp/progmodes/python.el: Add implemention of the function.
> > * test/lisp/progmodes/python-tests.el: Test case for the function.
> > * etc/NEWS: Document for the function.
>
> kobarity, any comments?
I think `python-shell-send-block' itself is good, but there may be
room for improvement in the test case.
It is better not to use f-strings as much as possible because it
depends on the Python version.
`python-tests-look-at' is basically for moving point. Since it looks
for the next occurrence of the specified string, it may move the point
to an unexpected location. For testing, it would be better to use
`looking-at', etc. or compare the point after moving with
`python-tests-look-at' to the expected value.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70609
; Package
emacs
.
(Tue, 30 Apr 2024 15:52:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 70609 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Kobarity,
On Tue, Apr 30, 2024 at 7:28 AM kobarity <kobarity <at> gmail.com> wrote:
>
> Eli Zaretskii wrote:
> >
> > > From: Lin Sun <sunlin7.mail <at> gmail.com>
> > > Date: Sat, 27 Apr 2024 14:14:06 +0000
> > >
> > > Here is a function 'python-shell-send-block' to send a block to the
> > > python interpreter in python mode, it's similar to
> > > `python-shell-send-defun` but works on block.
> > >
> > > The implementation and testing are included in that patch.
> > >
> > > Please help review the changes.
> > >
> > > [PATCH] New function 'python-shell-send-block' for python-mode
> > >
> > > * lisp/progmodes/python.el: Add implemention of the function.
> > > * test/lisp/progmodes/python-tests.el: Test case for the function.
> > > * etc/NEWS: Document for the function.
> >
> > kobarity, any comments?
>
> I think `python-shell-send-block' itself is good, but there may be
> room for improvement in the test case.
>
> It is better not to use f-strings as much as possible because it
> depends on the Python version.
>
> `python-tests-look-at' is basically for moving point. Since it looks
> for the next occurrence of the specified string, it may move the point
> to an unexpected location. For testing, it would be better to use
> `looking-at', etc. or compare the point after moving with
> `python-tests-look-at' to the expected value.
Thanks for the comments and you're right, so I attach the changes to
avoid the python f-string, also using the `looking-at` to do exactly
matching.
Please help review the enhanced testing code. Thanks.
[0001-New-function-python-shell-send-block-for-python-mode.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70609
; Package
emacs
.
(Wed, 01 May 2024 08:16:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 70609 <at> debbugs.gnu.org (full text, mbox):
Lin Sun wrote:
> Hi Kobarity,
>
> On Tue, Apr 30, 2024 at 7:28 AM kobarity <kobarity <at> gmail.com> wrote:
> >
> > Eli Zaretskii wrote:
> > >
> > > > From: Lin Sun <sunlin7.mail <at> gmail.com>
> > > > Date: Sat, 27 Apr 2024 14:14:06 +0000
> > > >
> > > > Here is a function 'python-shell-send-block' to send a block to the
> > > > python interpreter in python mode, it's similar to
> > > > `python-shell-send-defun` but works on block.
> > > >
> > > > The implementation and testing are included in that patch.
> > > >
> > > > Please help review the changes.
> > > >
> > > > [PATCH] New function 'python-shell-send-block' for python-mode
> > > >
> > > > * lisp/progmodes/python.el: Add implemention of the function.
> > > > * test/lisp/progmodes/python-tests.el: Test case for the function.
> > > > * etc/NEWS: Document for the function.
> > >
> > > kobarity, any comments?
> >
> > I think `python-shell-send-block' itself is good, but there may be
> > room for improvement in the test case.
> >
> > It is better not to use f-strings as much as possible because it
> > depends on the Python version.
> >
> > `python-tests-look-at' is basically for moving point. Since it looks
> > for the next occurrence of the specified string, it may move the point
> > to an unexpected location. For testing, it would be better to use
> > `looking-at', etc. or compare the point after moving with
> > `python-tests-look-at' to the expected value.
> Thanks for the comments and you're right, so I attach the changes to
> avoid the python f-string, also using the `looking-at` to do exactly
> matching.
> Please help review the enhanced testing code. Thanks.
Hi Lin,
Thanks, it looks good to me.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 02 May 2024 10:07:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Lin Sun <sunlin7.mail <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 02 May 2024 10:07:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 70609-done <at> debbugs.gnu.org (full text, mbox):
> From: Lin Sun <sunlin7.mail <at> gmail.com>
> Date: Tue, 30 Apr 2024 15:51:18 +0000
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 70609 <at> debbugs.gnu.org
>
> Hi Kobarity,
>
> On Tue, Apr 30, 2024 at 7:28 AM kobarity <kobarity <at> gmail.com> wrote:
> >
> > Eli Zaretskii wrote:
> > >
> > > > From: Lin Sun <sunlin7.mail <at> gmail.com>
> > > > Date: Sat, 27 Apr 2024 14:14:06 +0000
> > > >
> > > > Here is a function 'python-shell-send-block' to send a block to the
> > > > python interpreter in python mode, it's similar to
> > > > `python-shell-send-defun` but works on block.
> > > >
> > > > The implementation and testing are included in that patch.
> > > >
> > > > Please help review the changes.
> > > >
> > > > [PATCH] New function 'python-shell-send-block' for python-mode
> > > >
> > > > * lisp/progmodes/python.el: Add implemention of the function.
> > > > * test/lisp/progmodes/python-tests.el: Test case for the function.
> > > > * etc/NEWS: Document for the function.
> > >
> > > kobarity, any comments?
> >
> > I think `python-shell-send-block' itself is good, but there may be
> > room for improvement in the test case.
> >
> > It is better not to use f-strings as much as possible because it
> > depends on the Python version.
> >
> > `python-tests-look-at' is basically for moving point. Since it looks
> > for the next occurrence of the specified string, it may move the point
> > to an unexpected location. For testing, it would be better to use
> > `looking-at', etc. or compare the point after moving with
> > `python-tests-look-at' to the expected value.
> Thanks for the comments and you're right, so I attach the changes to
> avoid the python f-string, also using the `looking-at` to do exactly
> matching.
> Please help review the enhanced testing code. Thanks.
Thanks, installed on master (with some minor changes), and closing the
bug.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70609
; Package
emacs
.
(Thu, 02 May 2024 15:40:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 70609-done <at> debbugs.gnu.org (full text, mbox):
> Thanks, installed on master (with some minor changes), and closing the
> bug.
Thank you so much, and I checked your enhancement on doc and byte
compile, appreciate it !
This bug report was last modified 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.