tab-completion在运行ipdb的emacs shell中不起作用(但在正常的bash shell中它可以工作)

时间:2015-02-25 12:18:11

标签: python shell emacs autocomplete ipdb

我一直在尝试很多提示&来自各种stackoverflow讨论的技巧和更多,但我无法解决这个问题,请帮助:

在我的bash shell中有效:

我有这个python脚本:

a = [44, 22]
import ipdb
ipdb.set_trace()

当我运行它时,我按预期得到了ipdb提示符,当我输入" a。 TAB"然后一些自动完成功能建议所有这样的功能:

ipdb> a.
a.append   a.count    a.extend   a.index    a.insert   a.pop         a.remove   a.reverse  a.sort  

在我的EMACS shell中不起作用:

当我做同样的事情,但是从emacs shell中,选项卡完成不起作用。我指的是TAB和M-TAB。在这种情况下,Emacs告诉我"没有匹配"。 顺便说一句:当我编辑python文件时,M-TAB 完成。 这件事对我来说有点麻烦(这是一个很小的说法)。

我安装了许多建议的软件包:

auto-complete      1.5.0        installed  Auto Completion for GNU Emacs
company            0.8.11       installed  Modular text completion     framework
concurrent         0.3.2        installed  Concurrent utility functions for emacs lisp
ctable             0.1.2        installed  Table component for Emacs Lisp
deferred           0.3.2        installed  Simple asynchronous functions for emacs lisp
elpy               1.7.0        installed  Emacs Python Development Environment
epc                0.1.1        installed  A RPC stack for the Emacs Lisp
find-file-in-pr... 3.3          installed  Find files in a project quickly.
highlight-inden... 0.5.0        installed  Function for highlighting indentation
jedi               0.1.2        installed  Python auto-completion for Emacs
popup              0.5.2        installed  Visual Popup User Interface
python-environment 0.0.1        installed  virtualenv API for Emacs Lisp
pyvenv             1.6          installed  Python virtual environment interface
yasnippet          0.9.0.1      installed  Yet another snippet extension for Emacs.

顺便说一下:选项M-x RET jedi:install-server在此设置中不可用。

我的环境:

ubuntu 14.04 LTS
emacs 24.3.1

我也尝试过:

我还尝试使用安装了软件包的不稳定melpa源(http://melpa.milkbox.net/packages)来尝试(并且也没有工作):

auto-complete      20150218.819 installed  Auto Completion for GNU Emacs
company            20150224.... installed  Modular text completion framework
concurrent         20150205.616 installed  Concurrent utility functions for emacs lisp
ctable             20140304.... installed  Table component for Emacs Lisp
deferred           20150205.616 installed  Simple asynchronous functions for emacs lisp
elpy               20150206.... installed  Emacs Python Development Environment
epc                20140609.... installed  A RPC stack for the Emacs Lisp
find-file-in-pr... 20141214.... installed  Find files in a project quickly.
highlight-inden... 20150122.44  installed  Minor modes for highlighting indentation
jedi               20150217.... installed  Python auto-completion for Emacs
popup              20150116.... installed  Visual Popup User Interface
python-environment 20140321.... installed  virtualenv API for Emacs Lisp
pyvenv             20150218.... installed  Python virtual environment interface
yasnippet          20150212.240 installed  Yet another snippet extension for Emacs.

顺便说一下:在此设置中可以使用选项M-x RET jedi:install-server IS

任何想法......?

1 个答案:

答案 0 :(得分:0)

Sean Farley最近提出ipdb into realgud的请求。当我得到时间时,它会进入。在他的分支中,或者当它被拉动时,你可以M-x realgud-track-mode并给出“ipdb”作为要跟踪的调试器。据说有标签扩展。但是我不是ipdb用户,所以我没有验证这一点。