1

I'm running GNU Emacs Version 24.3 (9.0) on OS X Lion (obtained from http://emacsformacosx.com/). I'm relatively new to emacs, so I may be ignorant of a simple fix for my problem.

I recently expanded my use of helm-mode to include helm-locate and have helm offer extended-command suggestions. Unfortunately, I can't remember exactly how I activated these, but I think it must have been from the Customize Group interface, since my .emacs file doesn't have anything else about helm-mode except for binding C-x C-f to helm-find-files. Ever since I started using those features, when I open emacs I get the following error:

Warning (initialization): An error occurred while loading `/Users/aporiac/.emacs':

File error: Cannot open load file, helm-match-plugin

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. 

When I start emacs from the command line with the --debut-init flag, I get the following:

Debugger entered--Lisp error: (file-error "Cannot open load file" "helm-match-plugin")
require(helm-match-plugin)
mapc(require (helm-match-plugin))
custom-theme-set-variables(user (Linum-format "%7i ") (ansi-color-names-vector ["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#ad7fa8" "#8cc4ff" "#eeeeec"]) (ansi-term-color$
  apply(custom-theme-set-variables user ((Linum-format "%7i ") (ansi-color-names-vector ["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#ad7fa8" "#8cc4ff" "#eeeeec"]) (ansi-ter$
  custom-set-variables((Linum-format "%7i ") (ansi-color-names-vector ["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#ad7fa8" "#8cc4ff" "#eeeeec"]) (ansi-term-color-vector [un$
  eval-buffer(#<buffer  *load*> nil "/Users/aporiac/.emacs" nil t)  ; Reading at buffer position 5073
  load-with-code-conversion("/Users/aporiac/.emacs" "/Users/aporiac/.emacs" t t)
  load("~/.emacs" t t)
  #[nil "^H\205\276^@   \306=\203^Q^@\307^H\310Q\202A^@ \311=\2033^@\312\307\313\314#\203#^@\315\202A^@\312\307\313\316#\203/^@\317\202A^@\315\202A^@   \320=\203=^@\321\202A^@\307^$
  command-line()
  normal-top-level()

I can't deactivate helm-match-plugin from Customize Group and don't even know if this the problem. Any help would be greatly appreciated.

4

1 回答 1

2

phils有用的建议和信息的帮助下,我发现问题不是特定于 helm-mode 或 helm-match-plugin,而是由于我糟糕的 .emacs 文件。我可以通过删除 helm usingpackage-list-packages然后注释掉我的 .emcas 文件中涉及 helm 的所有函数来确定这一点。在重新启动 emacs 时报告了另一个错误,我注释掉了相应的函数,只是为了在随后的重新启动时遇到另一个错误。最后,我复制并清除了我的 .emacs 文件,并开始将它一点一点地拼凑起来,在每次重大更改后重新启动 emacs。似乎主要问题是存在许多(require 'modename-mode)功能。我按照我已安装的许多软件包的说明将这些功能添加到 .emacs 中,但是,我从 melpa 或 marmalade 安装了这些软件包,我想如果已经安装了这些软件包,则不需要它们。

我删除了所有(require 'modename-mode)功能(除了 (require 'package),无论出于何种原因,它似乎都不会引起问题)和其他一些在我的 .emacs 中乱扔的谷壳,然后我重新安装了 helm。事情似乎恢复了正常。

更新:

在过去的一年里,我通过Spacemacs的精彩图层系统管理我的包裹。从那以后,我几乎没有遇到过与包或初始化相关的问题。

于 2013-10-02T07:45:35.167 回答