From: chiel <machiel.kroon@gmail.com>
To: emacs-devel@gnu.org
Subject: Python mode, suggestion for command
Date: Sun, 30 Jul 2023 00:08:50 +0200 [thread overview]
Message-ID: <CAPZr=9EH8+1Q7BrNc__2mBJc6VMza_hse8uPdO-7jdSpKdTVYA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
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))
With kind regards.
Machiel Kroon
[-- Attachment #2: Type: text/html, Size: 946 bytes --]
next reply other threads:[~2023-07-29 22:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-29 22:08 chiel [this message]
2023-07-30 5:26 ` Python mode, suggestion for command Eli Zaretskii
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='CAPZr=9EH8+1Q7BrNc__2mBJc6VMza_hse8uPdO-7jdSpKdTVYA@mail.gmail.com' \
--to=machiel.kroon@gmail.com \
--cc=emacs-devel@gnu.org \
/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.