[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24110: [PATCH] Fix python.el completion with IPython 5.0 and python
From: |
npostavs |
Subject: |
bug#24110: [PATCH] Fix python.el completion with IPython 5.0 and python 2 |
Date: |
Mon, 03 Jul 2017 11:15:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
close 24110
quit
James Porter <james@jamesporter.me> writes:
> (defcustom python-shell-completion-string-code
> - "';'.join(__PYTHON_EL_get_completions('''%s'''))"
> + "print(';'.join(__PYTHON_EL_get_completions('''%s''')))"
This patch is no longer applicable, in 25.1 there is already a 'print'
added by python-shell-completion-get-completions.
(defun python-shell-completion-get-completions (process import input)
"Do completion at point using PROCESS for IMPORT or INPUT.
When IMPORT is non-nil takes precedence over INPUT for
completion."
(setq input (or import input))
(with-current-buffer (process-buffer process)
(let ((completions
(python-util-strip-string
(python-shell-send-string-no-output
(format
(concat python-shell-completion-setup-code
"\nprint (" python-shell-completion-string-code ")")
input) process))))
(when (> (length completions) 2)
(split-string completions
"^'\\|^\"\\|;\\|'$\\|\"$" t)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#24110: [PATCH] Fix python.el completion with IPython 5.0 and python 2,
npostavs <=