all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience
@ 2024-05-20 20:28 Lin Sun
  2024-05-25  8:03 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Lin Sun @ 2024-05-20 20:28 UTC (permalink / raw)
  To: 71083

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

Hi,

This patch tries to make `python-shell-send-block' more convenient.

I had added the function `python-shell-send-block'  twenty days ago in
bug#70609, it will send code block with header by default, and a
prefix "C-u" to call the function will send block without header.

And I received some feedback that sending a block without a header
should be a more used one.

Many python blocks begin with "if condition", and users may want to
send the block without its condition header to try different condition
branches.

So this patch will make sending block without header to be the default
behavior, and a prefix "C-u" will make the function to send block with
header.

Please help review this minor change. Thanks

[-- Attachment #2: 0001-Enhance-the-python-shell-send-block-for-convenience.patch --]
[-- Type: text/x-patch, Size: 2543 bytes --]

From 7eefbf3e4de925c211e483a809d0f8d94e8d17f0 Mon Sep 17 00:00:00 2001
From: Lin Sun <sunlin7@hotmail.com>
Date: Mon, 20 May 2024 06:55:31 +0000
Subject: [PATCH] ; Enhance the "python-shell-send-block" for convenience

* lisp/progmodes/python.el (python-shell-send-block):
  The "python-shell-send-block" will send block without header defaultly.
* lisp/progmodes/python.el: Update test case.
---
 lisp/progmodes/python.el            | 4 ++--
 test/lisp/progmodes/python-tests.el | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 7f28f583543..9ec198da79a 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -4149,14 +4149,14 @@ interactively."
   "Send the block at point to inferior Python process.
 The block is delimited by `python-nav-beginning-of-block' and
 `python-nav-end-of-block'.  If optional argument ARG is non-nil
-(interactively, the prefix argument), send the block body without
+(interactively, the prefix argument), send the block body with
 its header.  If optional argument MSG is non-nil, force display
 of a user-friendly message if there's no process running; this
 always happens interactively."
   (interactive (list current-prefix-arg t))
   (let ((beg (save-excursion
                (when (python-nav-beginning-of-block)
-                 (if (null arg)
+                 (if arg
                      (beginning-of-line)
                    (python-nav-end-of-statement)
                    (beginning-of-line 2)))
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index f50797953c3..803008db8a3 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -7476,7 +7476,7 @@ print('current 3')"
     (goto-char (point-min))
     (should-error (python-shell-send-block) :type 'user-error)
     (forward-line)
-    (python-shell-send-block)
+    (python-shell-send-block t) ;; send block with header
     (python-tests-shell-wait-for-prompt)
     (python-shell-with-shell-buffer
       (goto-char (point-min))
@@ -7485,7 +7485,7 @@ print('current 3')"
       (should (re-search-forward "current 2" nil t))
       (should-not (re-search-forward "current 3" nil t)))
     (forward-line)
-    (python-shell-send-block t) ;; send block body only
+    (python-shell-send-block) ;; send block body only
     (python-tests-shell-wait-for-prompt)
     (python-shell-with-shell-buffer
       ;; should only 1 line output from the block body
-- 
2.20.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience
  2024-05-20 20:28 bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience Lin Sun
@ 2024-05-25  8:03 ` Eli Zaretskii
  2024-05-25  8:49   ` kobarity
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-05-25  8:03 UTC (permalink / raw)
  To: Lin Sun, kobarity; +Cc: 71083

Any comments on the proposed patch?

> From: Lin Sun <sunlin7.mail@gmail.com>
> Date: Mon, 20 May 2024 20:28:17 +0000
> 
> This patch tries to make `python-shell-send-block' more convenient.
> 
> I had added the function `python-shell-send-block'  twenty days ago in
> bug#70609, it will send code block with header by default, and a
> prefix "C-u" to call the function will send block without header.
> 
> And I received some feedback that sending a block without a header
> should be a more used one.
> 
> Many python blocks begin with "if condition", and users may want to
> send the block without its condition header to try different condition
> branches.
> 
> So this patch will make sending block without header to be the default
> behavior, and a prefix "C-u" will make the function to send block with
> header.
> 
> Please help review this minor change. Thanks
> 
> 
> From 7eefbf3e4de925c211e483a809d0f8d94e8d17f0 Mon Sep 17 00:00:00 2001
> From: Lin Sun <sunlin7@hotmail.com>
> Date: Mon, 20 May 2024 06:55:31 +0000
> Subject: [PATCH] ; Enhance the "python-shell-send-block" for convenience
> 
> * lisp/progmodes/python.el (python-shell-send-block):
>   The "python-shell-send-block" will send block without header defaultly.
> * lisp/progmodes/python.el: Update test case.
> ---
>  lisp/progmodes/python.el            | 4 ++--
>  test/lisp/progmodes/python-tests.el | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> index 7f28f583543..9ec198da79a 100644
> --- a/lisp/progmodes/python.el
> +++ b/lisp/progmodes/python.el
> @@ -4149,14 +4149,14 @@ interactively."
>    "Send the block at point to inferior Python process.
>  The block is delimited by `python-nav-beginning-of-block' and
>  `python-nav-end-of-block'.  If optional argument ARG is non-nil
> -(interactively, the prefix argument), send the block body without
> +(interactively, the prefix argument), send the block body with
>  its header.  If optional argument MSG is non-nil, force display
>  of a user-friendly message if there's no process running; this
>  always happens interactively."
>    (interactive (list current-prefix-arg t))
>    (let ((beg (save-excursion
>                 (when (python-nav-beginning-of-block)
> -                 (if (null arg)
> +                 (if arg
>                       (beginning-of-line)
>                     (python-nav-end-of-statement)
>                     (beginning-of-line 2)))
> diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
> index f50797953c3..803008db8a3 100644
> --- a/test/lisp/progmodes/python-tests.el
> +++ b/test/lisp/progmodes/python-tests.el
> @@ -7476,7 +7476,7 @@ print('current 3')"
>      (goto-char (point-min))
>      (should-error (python-shell-send-block) :type 'user-error)
>      (forward-line)
> -    (python-shell-send-block)
> +    (python-shell-send-block t) ;; send block with header
>      (python-tests-shell-wait-for-prompt)
>      (python-shell-with-shell-buffer
>        (goto-char (point-min))
> @@ -7485,7 +7485,7 @@ print('current 3')"
>        (should (re-search-forward "current 2" nil t))
>        (should-not (re-search-forward "current 3" nil t)))
>      (forward-line)
> -    (python-shell-send-block t) ;; send block body only
> +    (python-shell-send-block) ;; send block body only
>      (python-tests-shell-wait-for-prompt)
>      (python-shell-with-shell-buffer
>        ;; should only 1 line output from the block body
> -- 
> 2.20.5
> 





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience
  2024-05-25  8:03 ` Eli Zaretskii
@ 2024-05-25  8:49   ` kobarity
  2024-05-25 15:57     ` Lin Sun
  0 siblings, 1 reply; 7+ messages in thread
From: kobarity @ 2024-05-25  8:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71083, Lin Sun


Eli Zaretskii wrote:
> Any comments on the proposed patch?
> 
> > From: Lin Sun <sunlin7.mail@gmail.com>
> > Date: Mon, 20 May 2024 20:28:17 +0000
> > 
> > This patch tries to make `python-shell-send-block' more convenient.
> > 
> > I had added the function `python-shell-send-block'  twenty days ago in
> > bug#70609, it will send code block with header by default, and a
> > prefix "C-u" to call the function will send block without header.
> > 
> > And I received some feedback that sending a block without a header
> > should be a more used one.
> > 
> > Many python blocks begin with "if condition", and users may want to
> > send the block without its condition header to try different condition
> > branches.
> > 
> > So this patch will make sending block without header to be the default
> > behavior, and a prefix "C-u" will make the function to send block with
> > header.
> > 
> > Please help review this minor change. Thanks
> > 
> > 
> > From 7eefbf3e4de925c211e483a809d0f8d94e8d17f0 Mon Sep 17 00:00:00 2001
> > From: Lin Sun <sunlin7@hotmail.com>
> > Date: Mon, 20 May 2024 06:55:31 +0000
> > Subject: [PATCH] ; Enhance the "python-shell-send-block" for convenience
> > 
> > * lisp/progmodes/python.el (python-shell-send-block):
> >   The "python-shell-send-block" will send block without header defaultly.
> > * lisp/progmodes/python.el: Update test case.
> > ---
> >  lisp/progmodes/python.el            | 4 ++--
> >  test/lisp/progmodes/python-tests.el | 4 ++--
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> > index 7f28f583543..9ec198da79a 100644
> > --- a/lisp/progmodes/python.el
> > +++ b/lisp/progmodes/python.el
> > @@ -4149,14 +4149,14 @@ interactively."
> >    "Send the block at point to inferior Python process.
> >  The block is delimited by `python-nav-beginning-of-block' and
> >  `python-nav-end-of-block'.  If optional argument ARG is non-nil
> > -(interactively, the prefix argument), send the block body without
> > +(interactively, the prefix argument), send the block body with
> >  its header.  If optional argument MSG is non-nil, force display
> >  of a user-friendly message if there's no process running; this
> >  always happens interactively."
> >    (interactive (list current-prefix-arg t))
> >    (let ((beg (save-excursion
> >                 (when (python-nav-beginning-of-block)
> > -                 (if (null arg)
> > +                 (if arg
> >                       (beginning-of-line)
> >                     (python-nav-end-of-statement)
> >                     (beginning-of-line 2)))
> > diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
> > index f50797953c3..803008db8a3 100644
> > --- a/test/lisp/progmodes/python-tests.el
> > +++ b/test/lisp/progmodes/python-tests.el
> > @@ -7476,7 +7476,7 @@ print('current 3')"
> >      (goto-char (point-min))
> >      (should-error (python-shell-send-block) :type 'user-error)
> >      (forward-line)
> > -    (python-shell-send-block)
> > +    (python-shell-send-block t) ;; send block with header
> >      (python-tests-shell-wait-for-prompt)
> >      (python-shell-with-shell-buffer
> >        (goto-char (point-min))
> > @@ -7485,7 +7485,7 @@ print('current 3')"
> >        (should (re-search-forward "current 2" nil t))
> >        (should-not (re-search-forward "current 3" nil t)))
> >      (forward-line)
> > -    (python-shell-send-block t) ;; send block body only
> > +    (python-shell-send-block) ;; send block body only
> >      (python-tests-shell-wait-for-prompt)
> >      (python-shell-with-shell-buffer
> >        ;; should only 1 line output from the block body
> > -- 
> > 2.20.5
> > 

As for the default behavior of `python-shell-send-block' I am fine
with either.

"send block without header defaultly." in the commit message would be
better for "send block without header by default."

I noticed two Flymake diagnostics regarding `python-shell-send-block'.

- Open parenthesis in column 0 should be escaped
- Error messages should *not* end with a period

It would be nice to resolve them.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience
  2024-05-25  8:49   ` kobarity
@ 2024-05-25 15:57     ` Lin Sun
  2024-05-26  0:35       ` kobarity
  2024-05-26  8:30       ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Lin Sun @ 2024-05-25 15:57 UTC (permalink / raw)
  To: kobarity; +Cc: 71083, Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 4638 bytes --]

On Sat, May 25, 2024 at 8:49 AM kobarity <kobarity@gmail.com> wrote:
> Eli Zaretskii wrote:
> > Any comments on the proposed patch?
> >
> > > From: Lin Sun <sunlin7.mail@gmail.com>
> > > Date: Mon, 20 May 2024 20:28:17 +0000
> > >
> > > This patch tries to make `python-shell-send-block' more convenient.
> > >
> > > I had added the function `python-shell-send-block'  twenty days ago in
> > > bug#70609, it will send code block with header by default, and a
> > > prefix "C-u" to call the function will send block without header.
> > >
> > > And I received some feedback that sending a block without a header
> > > should be a more used one.
> > >
> > > Many python blocks begin with "if condition", and users may want to
> > > send the block without its condition header to try different condition
> > > branches.
> > >
> > > So this patch will make sending block without header to be the default
> > > behavior, and a prefix "C-u" will make the function to send block with
> > > header.
> > >
> > > Please help review this minor change. Thanks
> > >
> > >
> > > From 7eefbf3e4de925c211e483a809d0f8d94e8d17f0 Mon Sep 17 00:00:00 2001
> > > From: Lin Sun <sunlin7@hotmail.com>
> > > Date: Mon, 20 May 2024 06:55:31 +0000
> > > Subject: [PATCH] ; Enhance the "python-shell-send-block" for convenience
> > >
> > > * lisp/progmodes/python.el (python-shell-send-block):
> > >   The "python-shell-send-block" will send block without header defaultly.
> > > * lisp/progmodes/python.el: Update test case.
> > > ---
> > >  lisp/progmodes/python.el            | 4 ++--
> > >  test/lisp/progmodes/python-tests.el | 4 ++--
> > >  2 files changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> > > index 7f28f583543..9ec198da79a 100644
> > > --- a/lisp/progmodes/python.el
> > > +++ b/lisp/progmodes/python.el
> > > @@ -4149,14 +4149,14 @@ interactively."
> > >    "Send the block at point to inferior Python process.
> > >  The block is delimited by `python-nav-beginning-of-block' and
> > >  `python-nav-end-of-block'.  If optional argument ARG is non-nil
> > > -(interactively, the prefix argument), send the block body without
> > > +(interactively, the prefix argument), send the block body with
> > >  its header.  If optional argument MSG is non-nil, force display
> > >  of a user-friendly message if there's no process running; this
> > >  always happens interactively."
> > >    (interactive (list current-prefix-arg t))
> > >    (let ((beg (save-excursion
> > >                 (when (python-nav-beginning-of-block)
> > > -                 (if (null arg)
> > > +                 (if arg
> > >                       (beginning-of-line)
> > >                     (python-nav-end-of-statement)
> > >                     (beginning-of-line 2)))
> > > diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
> > > index f50797953c3..803008db8a3 100644
> > > --- a/test/lisp/progmodes/python-tests.el
> > > +++ b/test/lisp/progmodes/python-tests.el
> > > @@ -7476,7 +7476,7 @@ print('current 3')"
> > >      (goto-char (point-min))
> > >      (should-error (python-shell-send-block) :type 'user-error)
> > >      (forward-line)
> > > -    (python-shell-send-block)
> > > +    (python-shell-send-block t) ;; send block with header
> > >      (python-tests-shell-wait-for-prompt)
> > >      (python-shell-with-shell-buffer
> > >        (goto-char (point-min))
> > > @@ -7485,7 +7485,7 @@ print('current 3')"
> > >        (should (re-search-forward "current 2" nil t))
> > >        (should-not (re-search-forward "current 3" nil t)))
> > >      (forward-line)
> > > -    (python-shell-send-block t) ;; send block body only
> > > +    (python-shell-send-block) ;; send block body only
> > >      (python-tests-shell-wait-for-prompt)
> > >      (python-shell-with-shell-buffer
> > >        ;; should only 1 line output from the block body
> > > --
> > > 2.20.5
> > >
>
> As for the default behavior of `python-shell-send-block' I am fine
> with either.
>
> "send block without header defaultly." in the commit message would be
> better for "send block without header by default."
>
> I noticed two Flymake diagnostics regarding `python-shell-send-block'.
>
> - Open parenthesis in column 0 should be escaped
> - Error messages should *not* end with a period
>
> It would be nice to resolve them.
Hi kobarity,

Thank you for the comment, you're right. I had fixed the flymake
diagnostics and the commit message.

Please help review again. Thanks.

[-- Attachment #2: 0001-Enhance-the-python-shell-send-block-for-convenience.patch --]
[-- Type: text/x-patch, Size: 2992 bytes --]

From c160a74f01535e53dd293c0924771c5b267e4906 Mon Sep 17 00:00:00 2001
From: Lin Sun <sunlin7@hotmail.com>
Date: Mon, 20 May 2024 06:55:31 +0000
Subject: [PATCH] ; Enhance the "python-shell-send-block" for convenience

* lisp/progmodes/python.el (python-shell-send-block):
  The "python-shell-send-block" will send block without header by default.
* lisp/progmodes/python.el: Update the test case.
---
 lisp/progmodes/python.el            | 6 +++---
 test/lisp/progmodes/python-tests.el | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 7f28f583543..af7c4122ba0 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -4149,14 +4149,14 @@ interactively."
   "Send the block at point to inferior Python process.
 The block is delimited by `python-nav-beginning-of-block' and
 `python-nav-end-of-block'.  If optional argument ARG is non-nil
-(interactively, the prefix argument), send the block body without
+\(interactively, the prefix argument), send the block body with
 its header.  If optional argument MSG is non-nil, force display
 of a user-friendly message if there's no process running; this
 always happens interactively."
   (interactive (list current-prefix-arg t))
   (let ((beg (save-excursion
                (when (python-nav-beginning-of-block)
-                 (if (null arg)
+                 (if arg
                      (beginning-of-line)
                    (python-nav-end-of-statement)
                    (beginning-of-line 2)))
@@ -4165,7 +4165,7 @@ always happens interactively."
         (python-indent-guess-indent-offset-verbose nil))
     (if (and beg end)
         (python-shell-send-region beg end nil msg t)
-      (user-error "Can't get code block from current position."))))
+      (user-error "Can't get code block from current position"))))
 
 (defun python-shell-send-buffer (&optional send-main msg)
   "Send the entire buffer to inferior Python process.
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index f50797953c3..803008db8a3 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -7476,7 +7476,7 @@ print('current 3')"
     (goto-char (point-min))
     (should-error (python-shell-send-block) :type 'user-error)
     (forward-line)
-    (python-shell-send-block)
+    (python-shell-send-block t) ;; send block with header
     (python-tests-shell-wait-for-prompt)
     (python-shell-with-shell-buffer
       (goto-char (point-min))
@@ -7485,7 +7485,7 @@ print('current 3')"
       (should (re-search-forward "current 2" nil t))
       (should-not (re-search-forward "current 3" nil t)))
     (forward-line)
-    (python-shell-send-block t) ;; send block body only
+    (python-shell-send-block) ;; send block body only
     (python-tests-shell-wait-for-prompt)
     (python-shell-with-shell-buffer
       ;; should only 1 line output from the block body
-- 
2.20.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience
  2024-05-25 15:57     ` Lin Sun
@ 2024-05-26  0:35       ` kobarity
  2024-05-26  8:30       ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: kobarity @ 2024-05-26  0:35 UTC (permalink / raw)
  To: Lin Sun; +Cc: 71083, Eli Zaretskii


Lin Sun wrote:
> On Sat, May 25, 2024 at 8:49 AM kobarity <kobarity@gmail.com> wrote:
> > Eli Zaretskii wrote:
> > > Any comments on the proposed patch?
> > >
> > > > From: Lin Sun <sunlin7.mail@gmail.com>
> > > > Date: Mon, 20 May 2024 20:28:17 +0000
> > > >
> > > > This patch tries to make `python-shell-send-block' more convenient.
> > > >
> > > > I had added the function `python-shell-send-block'  twenty days ago in
> > > > bug#70609, it will send code block with header by default, and a
> > > > prefix "C-u" to call the function will send block without header.
> > > >
> > > > And I received some feedback that sending a block without a header
> > > > should be a more used one.
> > > >
> > > > Many python blocks begin with "if condition", and users may want to
> > > > send the block without its condition header to try different condition
> > > > branches.
> > > >
> > > > So this patch will make sending block without header to be the default
> > > > behavior, and a prefix "C-u" will make the function to send block with
> > > > header.
> > > >
> > > > Please help review this minor change. Thanks
> > > >
> > > >
> > > > From 7eefbf3e4de925c211e483a809d0f8d94e8d17f0 Mon Sep 17 00:00:00 2001
> > > > From: Lin Sun <sunlin7@hotmail.com>
> > > > Date: Mon, 20 May 2024 06:55:31 +0000
> > > > Subject: [PATCH] ; Enhance the "python-shell-send-block" for convenience
> > > >
> > > > * lisp/progmodes/python.el (python-shell-send-block):
> > > >   The "python-shell-send-block" will send block without header defaultly.
> > > > * lisp/progmodes/python.el: Update test case.
> > > > ---
> > > >  lisp/progmodes/python.el            | 4 ++--
> > > >  test/lisp/progmodes/python-tests.el | 4 ++--
> > > >  2 files changed, 4 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> > > > index 7f28f583543..9ec198da79a 100644
> > > > --- a/lisp/progmodes/python.el
> > > > +++ b/lisp/progmodes/python.el
> > > > @@ -4149,14 +4149,14 @@ interactively."
> > > >    "Send the block at point to inferior Python process.
> > > >  The block is delimited by `python-nav-beginning-of-block' and
> > > >  `python-nav-end-of-block'.  If optional argument ARG is non-nil
> > > > -(interactively, the prefix argument), send the block body without
> > > > +(interactively, the prefix argument), send the block body with
> > > >  its header.  If optional argument MSG is non-nil, force display
> > > >  of a user-friendly message if there's no process running; this
> > > >  always happens interactively."
> > > >    (interactive (list current-prefix-arg t))
> > > >    (let ((beg (save-excursion
> > > >                 (when (python-nav-beginning-of-block)
> > > > -                 (if (null arg)
> > > > +                 (if arg
> > > >                       (beginning-of-line)
> > > >                     (python-nav-end-of-statement)
> > > >                     (beginning-of-line 2)))
> > > > diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
> > > > index f50797953c3..803008db8a3 100644
> > > > --- a/test/lisp/progmodes/python-tests.el
> > > > +++ b/test/lisp/progmodes/python-tests.el
> > > > @@ -7476,7 +7476,7 @@ print('current 3')"
> > > >      (goto-char (point-min))
> > > >      (should-error (python-shell-send-block) :type 'user-error)
> > > >      (forward-line)
> > > > -    (python-shell-send-block)
> > > > +    (python-shell-send-block t) ;; send block with header
> > > >      (python-tests-shell-wait-for-prompt)
> > > >      (python-shell-with-shell-buffer
> > > >        (goto-char (point-min))
> > > > @@ -7485,7 +7485,7 @@ print('current 3')"
> > > >        (should (re-search-forward "current 2" nil t))
> > > >        (should-not (re-search-forward "current 3" nil t)))
> > > >      (forward-line)
> > > > -    (python-shell-send-block t) ;; send block body only
> > > > +    (python-shell-send-block) ;; send block body only
> > > >      (python-tests-shell-wait-for-prompt)
> > > >      (python-shell-with-shell-buffer
> > > >        ;; should only 1 line output from the block body
> > > > --
> > > > 2.20.5
> > > >
> >
> > As for the default behavior of `python-shell-send-block' I am fine
> > with either.
> >
> > "send block without header defaultly." in the commit message would be
> > better for "send block without header by default."
> >
> > I noticed two Flymake diagnostics regarding `python-shell-send-block'.
> >
> > - Open parenthesis in column 0 should be escaped
> > - Error messages should *not* end with a period
> >
> > It would be nice to resolve them.
> Hi kobarity,
> 
> Thank you for the comment, you're right. I had fixed the flymake
> diagnostics and the commit message.
> 
> Please help review again. Thanks.

Thanks, it looks good to me.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience
  2024-05-25 15:57     ` Lin Sun
  2024-05-26  0:35       ` kobarity
@ 2024-05-26  8:30       ` Eli Zaretskii
  2024-05-26 18:41         ` Lin Sun
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-05-26  8:30 UTC (permalink / raw)
  To: Lin Sun; +Cc: 71083-done, kobarity

> From: Lin Sun <sunlin7.mail@gmail.com>
> Date: Sat, 25 May 2024 15:57:51 +0000
> Cc: Eli Zaretskii <eliz@gnu.org>, 71083@debbugs.gnu.org
> 
> Thank you for the comment, you're right. I had fixed the flymake
> diagnostics and the commit message.
> 
> Please help review again. Thanks.

Thanks, installed, and closing the bug.

Please in the future try to follow our conventions for commit log
messages more closely:

  . quote symbols 'like this'
  . wrap lines at column 63
  . ensure correct file names
  . mention test names in patches in test/ files
  . mention the bug number, if known

You can see how I reformatted your commit log message this time, to
understand better the above conventions.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience
  2024-05-26  8:30       ` Eli Zaretskii
@ 2024-05-26 18:41         ` Lin Sun
  0 siblings, 0 replies; 7+ messages in thread
From: Lin Sun @ 2024-05-26 18:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71083-done, kobarity

On Sun, May 26, 2024 at 8:31 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Lin Sun <sunlin7.mail@gmail.com>
> > Date: Sat, 25 May 2024 15:57:51 +0000
> > Cc: Eli Zaretskii <eliz@gnu.org>, 71083@debbugs.gnu.org
> >
> > Thank you for the comment, you're right. I had fixed the flymake
> > diagnostics and the commit message.
> >
> > Please help review again. Thanks.
>
> Thanks, installed, and closing the bug.
>
> Please in the future try to follow our conventions for commit log
> messages more closely:
>
>   . quote symbols 'like this'
>   . wrap lines at column 63
>   . ensure correct file names
>   . mention test names in patches in test/ files
>   . mention the bug number, if known
>
> You can see how I reformatted your commit log message this time, to
> understand better the above conventions.
Thank you for your comments, and I checked your listed points and the
commit message, also readed the CONTRIBUTE document, will follow the
points. Appreciate !





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-26 18:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 20:28 bug#71083: [PATCH] ; Enhance the "python-shell-send-block" for convenience Lin Sun
2024-05-25  8:03 ` Eli Zaretskii
2024-05-25  8:49   ` kobarity
2024-05-25 15:57     ` Lin Sun
2024-05-26  0:35       ` kobarity
2024-05-26  8:30       ` Eli Zaretskii
2024-05-26 18:41         ` Lin Sun

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.