python - tab 补全在运行 ipdb 的 emacs shell 中不起作用(但在正常的 bash shell 中它有效)

标签 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 在此设置中可用。

任何想法......?

最佳答案

Sean Farley 最近提出了 ipdb into realgud 的拉取请求.当我得到时间,那会进去。在他的 fork 中,或者当它被拉出时,你可以使用 M-x realgud-track-mode 并将“ipdb”作为要跟踪的调试器。据说有选项卡扩展。但是我不是 ipdb 用户,所以我还没有验证这一点。

关于python - tab 补全在运行 ipdb 的 emacs shell 中不起作用(但在正常的 bash shell 中它有效),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28718873/

相关文章:

python - 是否可以在 s3(csv 文件)之间创建工作流程( Airflow )以将其存储在 mongodb 中?

bash - gitlab-ci:具有变量扩展的远程 shell 执行

emacs - emacs下使用gdb时的缓冲区控制

Emacs Lisp 宏步进器

python - 根据 bins 组合字典键

python - 不规则的表达

python - 如何使用键 :value format from a CSV file using Python? 创建字典列表

php - 调用 shell 命令的脚本在 CLI 中工作,而不是在 Web 上下文中工作

shell - 如何在Shell脚本中使用环境变量名称中的变量?

emacs - 在 Emacs 中运行 Chicken Schedule 时遇到问题