【问题标题】:Configure autocomplete in emacs?在emacs中配置自动完成?
【发布时间】:2014-02-05 19:13:33
【问题描述】:

我已经在 MELPA 的 emacs 中安装了 auto-complete 包,我可以使用 M-x auto-complete-mode 启用它。我在配置方面遇到了一些问题,我已将以下几行添加到我的 .emacs

(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-20140201.2101")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/elpa/auto-complete-20140201.2101/dict")
(ac-config-default)

当我启动 emacs 时出现错误

Warning (initialization): An error occurred while loading `/home/user/.emacs':

File error: Cannot open load file, popup

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

auto-complete 需要popup,如果我列出带有M-x list-packages 的软件包,两者都被列为已安装。关于我应该如何做到这一点的任何建议?

【问题讨论】:

    标签: emacs autocomplete


    【解决方案1】:

    这样的简单配置应该可以工作:

    (setq package-user-dir "~/.emacs.d/elpa/")
    (package-initialize)
    

    无需专门更改load-path

    【讨论】:

    • 也不需要设置package-user-dir。您上面的值是默认值。
    猜你喜欢
    • 2014-12-29
    • 2011-05-04
    • 1970-01-01
    • 2015-01-05
    • 2013-11-01
    • 1970-01-01
    • 2018-11-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多