GNU bug report logs -
#24110
[PATCH] Fix python.el completion with IPython 5.0 and python 2
Previous Next
Reported by: James Porter <james <at> jamesporter.me>
Date: Sat, 30 Jul 2016 01:18:02 UTC
Severity: normal
Tags: patch
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #8 received at 24110 <at> debbugs.gnu.org (full text, mbox):
close 24110
quit
James Porter <james <at> 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)))))
This bug report was last modified 8 years and 38 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.