【发布时间】:2015-01-05 10:50:06
【问题描述】:
我是 Emacs 新手,我下载了 auto-complete,将其移至 ~/.emacs.d/plugins/ 然后修改 .emacs 文件如下所示:
(add-to-list 'load-path (file-name-as-directory
(expand-file-name "~/.emacs.d/plugins/auto-complete"))\
)
(require 'auto-complete)
(global-auto-complete-mode t)
(ac-config-default)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(menu-bar-mode nil)
'(package-archives (quote (("melpa" . "http://stable.melpa.org/packages/") ("g\
nu" . "http://elpa.gnu.org/packages/")))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
当我重新启动 emacs 时,它显示以下错误:
Warning (initialization): An error occurred while loading `/Users/zeaksilva/.emacs':
File error: Cannot open load file, auto-complete
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.
【问题讨论】:
-
我不确定这是否是主题,但似乎在Emacs 上可能更合适。
-
@MatthewHaugen:为什么不在这里(也)成为主题?现在我们在两个地方都有same question。没有帮助,恕我直言。如果您想将它从这里迁移到那里(我认为不需要),那么就这样做。至少这不会导致问题的重复和答案的分散。
-
auto-complete使用第三方 ELPA 存储库(如 Marmalade,您似乎已经在使用)更容易安装,为什么还要手动下载并尝试安装? -
您的代码看起来不错,所以问题可能与 emacs 无关。文件名有错别字吗?要加载的文件是否以 .el 或 .elc 结尾?您可以手动(加载...)文件吗? (你知道你可以通过将光标移到它后面并按 C-x C-e 来执行 emacs lisp 表达式)
标签: emacs