GNU bug report logs -
#57574
[PATCH] Add Python import management commands
Previous Next
Reported by: Augusto Stoffel <arstoffel <at> gmail.com>
Date: Sun, 4 Sep 2022 10:32:02 UTC
Severity: normal
Tags: patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57574 in the body.
You can then email your comments to 57574 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57574
; Package
emacs
.
(Sun, 04 Sep 2022 10:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Augusto Stoffel <arstoffel <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 04 Sep 2022 10:32:02 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)]
Tags: patch
This patch adds a few commands to help managing import statements in
Python projects. (I submitted equivalent code some time ago as a
potential ELPA package, and it was noted that this fits better in
python.el itself.)
This patch should be applied after the patch of bug#56997, since it
requires, in a rather substantial way, the project dependency.
I also had to introduce a new `python-interpreter' defcustom. Here are
two observations:
1) Its default value should perhaps coincide with that of
`python-shell-interpreter'. But I disagree of the logic used there to
pick python3 if present. There are only two reasons why `python'
should point to the python2 interpreter:
a. The user is working on a legacy project and carefully set the
python executable to point to a python2 interpreter.
b. The user's OS is woefully misconfigured.
We should have a default that works with case a. instead of one that
tries to fix case b.
2) For extra consistency, it might be better to have
python-shell-interpreter be nil by default, and use
(or python-shell-interpreter python-interpreter)
when starting a shell. But this would be a minor improvement that
might break third-party code.
[0001-Add-Python-import-management-commands.patch (text/patch, attachment)]
[Message part 3 (text/plain, inline)]
PS: Wouldn't it be handy also in other places to have a macro that
creates a temp buffer but doesn't switch to it? Maybe with signature
(with-temp-buffers (NAMES &rest BODY)).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57574
; Package
emacs
.
(Sun, 04 Sep 2022 11:19:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 57574 <at> debbugs.gnu.org (full text, mbox):
Augusto Stoffel <arstoffel <at> gmail.com> writes:
> This patch adds a few commands to help managing import statements in
> Python projects. (I submitted equivalent code some time ago as a
> potential ELPA package, and it was noted that this fits better in
> python.el itself.)
Thanks; pushed to Emacs 29.
> PS: Wouldn't it be handy also in other places to have a macro that
> creates a temp buffer but doesn't switch to it? Maybe with signature
> (with-temp-buffers (NAMES &rest BODY)).
Hm... I can see how that can be useful in some cases, but it's probably
not a very common usage pattern. But I think there's a real problem
that people would just be confused and mistake that for something that
does the same thing as with-temp-buffer.
bug marked as fixed in version 29.1, send any further explanations to
57574 <at> debbugs.gnu.org and Augusto Stoffel <arstoffel <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Sep 2022 11:19:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 02 Oct 2022 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 178 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.