简体   繁体   English

Emacs无法加载自动完成的程序包

[英]Emacs cannot load auto-complete package

I have Emacs (the latest from the savannah repo) installed, and I used package-install to get auto-complete-20140414.2324 . 我安装了Emacs( auto-complete-20140414.2324的最新版本),并且使用package-install来获取auto-complete-20140414.2324 I then followed (or tried to) the instructions at this site . 然后,我遵循了(或试图遵循) 此站点上的指示。 Specifically, I added the following to my .emacs : 具体来说,我在.emacs添加了以下内容:

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

I know for a fact that those directories are where auto-complete-20140414 and its dictionary folder respectively are. 我知道一个事实,这些目录分别是auto-complete-20140414及其字典文件夹所在的位置。 However, when I boot Emacs, I get the following warning: 但是,当我启动Emacs时,收到以下警告:

File error: Cannot open load file, no such file or directory, auto-complete-config

There's nothing in the instructions I found about this, and I'm not sure what the issue is. 我发现的说明中没有任何内容,我不确定是什么问题。 Could someone help me out? 有人可以帮我吗?

Your configuration is wrong. 您的配置错误。 You need not to set load-path manually for installed packages with package.el. 您无需使用package.el为安装的软件包手动设置load-path You just call package-initialize as below. 您只需按以下方式调用package-initialize package-initialize set load-path for all installed package directories. package-initialize为所有已安装的软件包目录设置load-path

(package-initialize)

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM