[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8f611e5: Fix bad quoting of python-shell-interprete
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 8f611e5: Fix bad quoting of python-shell-interpreter |
Date: |
Fri, 9 Dec 2016 05:28:46 +0000 (UTC) |
branch: master
commit 8f611e5e2309ae3f7f1753f0d2f7a60ca6fc2657
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Fix bad quoting of python-shell-interpreter
`python-shell-calculate-command' was using `shell-quote-argument' as if
it was generating a shell command, but its callers don't pass the result
to a shell, and they expect to parse it with `split-string-and-unquote'.
This caused problems depending on the flavor of shell quoting in
effect (Bug#25025).
* lisp/progmodes/python.el (python-shell-calculate-command): Use
`combine-and-quote-strings' to quote the interpreter, so that it can be
parsed by `python-shell-make-comint' successfully using
`split-string-and-unquote'.
---
lisp/progmodes/python.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index af8b791..3701812 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2379,7 +2379,9 @@ the `buffer-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)
+ ;; `python-shell-make-comint' expects to be able to
+ ;; `split-string-and-unquote' the result of this function.
+ (combine-and-quote-strings (list python-shell-interpreter))
python-shell-interpreter-args))
(define-obsolete-function-alias
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 8f611e5: Fix bad quoting of python-shell-interpreter,
Noam Postavsky <=