読者です 読者をやめる 読者になる 読者になる

@Konboi memo

主に技術に関してつらつらと。

emacsをel-get.elに対応させようとしたら。

memo Emacs

はじめに

emacselispの管理は el-getっていうパッケージマネージャーがいいらしいという噂を聞いたので、 先週末にもろもろ設定させてた。

設定ファイル : Konboi/dot-emacs

が、エラーがでて読み込みに失敗してしまう。

エラー

Warning (initialization): An error occurred while loading `/Users/yabuki-ryosuke/.emacs.d/init.el':

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.

auto-complete読み込めないというエラーが出るのでインストールされてないのかとおもったけど、

$ pwd 
# /Users/yabuki-ryosuke/.emacs.d/el-get

$ ls -l 
# ...
# drwxr-xr-x  22 yabuki-ryosuke  staff   748  2 16 22:49 auto-complete
# ...

特に問題なさそう...

auto-complete.el もちゃんとあるしな...

$ ls -l 

-rw-r--r--   1 yabuki-ryosuke  staff  22962  2 16 22:49 COPYING.FDL
-rw-r--r--   1 yabuki-ryosuke  staff  35147  2 16 22:49 COPYING.GPLv3
-rw-r--r--   1 yabuki-ryosuke  staff    708  2 16 22:49 Makefile
-rw-r--r--   1 yabuki-ryosuke  staff    662  2 16 22:49 README.md
-rw-r--r--   1 yabuki-ryosuke  staff    262  2 16 22:49 TODO.md
-rw-r--r--   1 yabuki-ryosuke  staff  18501  2 16 22:49 auto-complete-config.el
-rw-r--r--   1 yabuki-ryosuke  staff  16123  2 16 22:49 auto-complete-config.elc
-rw-r--r--   1 yabuki-ryosuke  staff     94  2 16 22:49 auto-complete-pkg.el
-rw-r--r--   1 yabuki-ryosuke  staff    639  2 16 22:49 auto-complete-pkg.elc
-rw-r--r--   1 yabuki-ryosuke  staff  69266  2 16 22:49 auto-complete.el
-rw-r--r--   1 yabuki-ryosuke  staff  62465  2 16 22:49 auto-complete.elc
drwxr-xr-x  26 yabuki-ryosuke  staff    884  2 16 22:49 dict
drwxr-xr-x  13 yabuki-ryosuke  staff    442  2 16 22:49 doc
drwxr-xr-x   5 yabuki-ryosuke  staff    170  2 16 22:49 etc
drwxr-xr-x   5 yabuki-ryosuke  staff    170  2 16 22:49 lib
drwxr-xr-x   5 yabuki-ryosuke  staff    170  2 16 22:49 tests

デバッグモードでたちあげてみると

Cellar/emacs/24.2/Emacs.app/Contents/MacOS/Emacs -nw

  Debugger entered--Lisp error: (file-error "Cannot open load file" "auto-complete")
  require(auto-complete)
  byte-code("\300\301!\210\300\302\303\304#\207" [require auto-complete company nil t] 4)(
  require(ac-company)
  (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature))
  (while --cl-dolist-temp-- (setq feat (car --cl-dolist-temp--)) (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
  (let ( (--cl-dolist-temp-- feats) feat) (while --cl-dolist-temp-- (setq feat (car --cl-dolist-temp--)) (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))))
  (catch (quote --cl-block-nil--) (let ( (--cl-dolist-temp-- feats) feat) (while --cl-dolist-temp-- (setq feat (car --cl-dolist-temp--)) (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature)) (setq --cl-dolist-temp-- (cdr --cl-dol$
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let ( (--cl-dolist-temp-- feats) feat) (while --cl-dolist-temp-- (setq feat (car --cl-dolist-temp--)) (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature)) (setq --cl-dolist-te$
  (block nil (let ( (--cl-dolist-temp-- feats) feat) (while --cl-dolist-temp-- (setq feat (car --cl-dolist-temp--)) (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
  (dolist (feat feats) (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature)))
  (if (eq method (quote elpa)) nil (dolist (feat feats) (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature))))
  (unless (eq method (quote elpa)) (dolist (feat feats) (let ( (feature (el-get-as-symbol feat))) (el-get-verbose-message "require '%s" feature) (require feature))))
  (if lazy nil (dolist (file loads) (let ( (pfile (concat pdir file))) (unless (file-exists-p pfile) (error "el-get could not find file '%s'" pfile)) (el-get-verbose-message "el-get: load '%s'" pfile) (el-get-load-fast pfile))) (unless (eq method (quote elpa)) (dolist (feat feats) $
  (unless lazy (dolist (file loads) (let ( (pfile (concat pdir file))) (unless (file-exists-p pfile) (error "el-get could not find file '%s'" pfile)) (el-get-verbose-message "el-get: load '%s'" pfile) (el-get-load-fast pfile))) (unless (eq method (quote elpa)) (dolist (feat feats) $
  (let* ( (el-get-sources (el-get-package-status-recipes)) (source (el-get-read-package-status-recipe package package-status-alist)) (method (el-get-package-method source)) (loads (el-get-as-list (plist-get source :load))) (autoloads (plist-get source :autoloads)) (feats (el-get-as$
  (condition-case err (let* ( (el-get-sources (el-get-package-status-recipes)) (source (el-get-read-package-status-recipe package package-status-alist)) (method (el-get-package-method source)) (loads (el-get-as-list (plist-get source :load))) (autoloads (plist-get source :autoloads$
  el-get-do-init(ac-company)
  (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--)))
  (let* ( (--cl-var-- init-deps) (p nil) (done nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--))) nil)
  (catch (quote --cl-block-nil--) (let* ( (--cl-var-- init-deps) (p nil) (done nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--))) nil))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ( (--cl-var-- init-deps) (p nil) (done nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--))) nil)))
  (block nil (let* ( (--cl-var-- init-deps) (p nil) (done nil)) (while (consp --cl-var--) (setq p (car --cl-var--)) (el-get-do-init p) (setq done (nconc done (list p))) (setq --cl-var-- (cdr --cl-var--))) nil))
  (loop for p in init-deps do (el-get-do-init p) collect p into done)
  (let* ( (p-s-alist (el-get-read-status-file)) (required (el-get-filter-package-alist-with-status p-s-alist "required")) (installed (el-get-filter-package-alist-with-status p-s-alist "installed")) (to-init (if packages (loop for p in packages when (member (el-get-as-string p) inst$
  el-get-init-and-install(nil)
  (prog1 (el-get-init-and-install (mapcar (quote el-get-as-symbol) packages)) (el-get-eval-autoloads))
  (let* ( (packages (loop for p in packages when (listp p) append p else collect p)) (total (length packages)) (installed (el-get-count-packages-with-status packages "installed")) (el-get-default-process-sync sync)) (prog1 (el-get-init-and-install (mapcar (quote el-get-as-symbol) p$
  el-get(sync)
  eval-buffer(#<buffer  *load*> nil "/Users/yabuki-ryosuke/.emacs.d/init.el" nil t)  ; Reading at buffer position 802
  load-with-code-conversion("/Users/yabuki-ryosuke/.emacs.d/init.el" "/Users/yabuki-ryosuke/.emacs.d/init.el" t t)
  load("/Users/yabuki-ryosuke/.emacs.d/init" t t)
  #[0 "^H\205\262^@     \306=\203^Q^@\307^H\310Q\202;^@ \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\202;^@\313\307\314\317#\203:^@\320\nB^R\321\202;^@\316\322^S\323^A\322\211#\210^K\322=\203a^@\324\325\326\307^H\327Q!\"\323^A\322\211#\210^K\322=\203`^@^A^S\210^K\20$
  command-line()
  normal-top-level() 

こんな感じのエラーログがでる。

起動時に

M-x el-get-init auto-complete

して

load-file init.el

とかすると起動できる

んー 何が原因なんだろう...

完全に以降するには、もう少し時間がかかりそう...

あわせて読みたい