all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: chiel <machiel.kroon@gmail.com>, kobarity <kobarity@gmail.com>,
	Augusto Stoffel <arstoffel@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Python mode, suggestion for command
Date: Sun, 30 Jul 2023 08:26:14 +0300	[thread overview]
Message-ID: <83tttmkm15.fsf@gnu.org> (raw)
In-Reply-To: <CAPZr=9EH8+1Q7BrNc__2mBJc6VMza_hse8uPdO-7jdSpKdTVYA@mail.gmail.com> (message from chiel on Sun, 30 Jul 2023 00:08:50 +0200)

> From: chiel <machiel.kroon@gmail.com>
> Date: Sun, 30 Jul 2023 00:08:50 +0200
> 
> Dear python-mode maintainers,
> 
> I'd like to suggest adding the following command to python.el,
> and binding it to C-<return> by default. I'd love to hear your thoughts.
> 
> (defun python-shell-send-paragraph (&optional send-main msg)
>   "Send all lines of code between two white lines to inferior
> Python process. SEND-MAIN defaults to nil and MSG to t.
> See `python-shell-send-region for more information.
> Interactively, SEND-MAIN is the prefix argument"
>   (interactive "Pi")
>   (python-shell-send-region
>    (or (save-excursion (re-search-backward "^[:blank:]*$" nil t))
> (point-min))
>    (or (save-excursion (re-search-forward  "^[:blank:]*$" nil t))
> (point-max))
>    send-main (not msg) t))

Thanks.

Adding the relevant developers to the discussion.



  reply	other threads:[~2023-07-30  5:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29 22:08 Python mode, suggestion for command chiel
2023-07-30  5:26 ` Eli Zaretskii [this message]
2023-07-30  6:29   ` Eshel Yaron
2023-07-30  6:35     ` chiel
2023-07-30 12:45       ` chiel
2023-07-31 15:52         ` kobarity
2023-07-31 17:08           ` Matthias Meulien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tttmkm15.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=arstoffel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=kobarity@gmail.com \
    --cc=machiel.kroon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.