GNU bug report logs -
#25025
python-shell-calculate-command is wrong
Previous Next
Reported by: Fabrice Popineau <fabrice.popineau <at> gmail.com>
Date: Fri, 25 Nov 2016 06:26:01 UTC
Severity: normal
Tags: confirmed, fixed
Merged with 20744
Found in version 25.1
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #76 received at 25025 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>
> So the problematic scenario is that the user sets
> python-shell-interpreter to something we already checked, and then
> manually feeds us with a command that invokes a different Python
> interpreter, is that it? Is that a frequent use case, which we
> should care about? Just to produce a warning?
>
> Even if we do want to care about, we could try matching the beginning
> of the command, perhaps after an optional quote character, and if we
> don't recognize the interpreter, do nothing. Would that be
> sufficient?
To be honest, I don't use python enough to say what the best fix is
here. I can say that the easiest way to solve this bug is:
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2379,7 +2379,7 @@ python-shell-internal-get-process-name
(defun python-shell-calculate-command ()
"Calculate the string used to execute the inferior Python process."
(format "%s %s"
- (shell-quote-argument python-shell-interpreter)
+ (combine-and-quote-strings (list python-shell-interpreter))
python-shell-interpreter-args))
This bug report was last modified 7 years and 277 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.