According to Emacs Eclim, I added the following to
~/.emacs.d/init.d
foremacs-eclim
:(require 'eclim) (global-eclim-mode) ; If you want to control eclimd from emacs, also add: (require 'eclimd)
The output of
emacs -nw --debug-init
is:Debugger entered--Lisp error: (file-error "Cannot open load file" "eclim") require(eclim) eval-buffer(#<buffer *load*> nil "/home/tim/.emacs.d/init.el" nil t) ; Reading at buffer position 4117 load-with-code-conversion("/home/tim/.emacs.d/init.el" "/home/tim/.emacs.d/init.el" t t) load("/home/tim/.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#\$ command-line() normal-top-level()
If I add the following line at the beginning:
(add-to-list 'load-path "~/.emacs.d/elpa/emacs-eclim-20140809.207/") (require 'eclim) (global-eclim-mode) ; If you want to control eclimd from emacs, also add: (require 'eclimd)
The output of
emacs -nw --debug-init
is:Debugger entered--Lisp error: (file-error "Cannot open load file" "s") require(s) byte-code("\300\301!\210\300\302!\210\303\304\305\306\307\310%\210\311\312\313\314\315\316\307\304&^G\207" [require etags s custom-declare$ require(eclim) eval-buffer(#<buffer *load*> nil "/home/tim/.emacs.d/init.el" nil t) ; Reading at buffer position 4115 load-with-code-conversion("/home/tim/.emacs.d/init.el" "/home/tim/.emacs.d/init.el" t t) load("/home/tim/.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#\$ command-line() normal-top-level()
If I instead add a different line at the beginning, it works without error:
(package-initialize) (require 'eclim) (global-eclim-mode) ; If you want to control eclimd from emacs, also add: (require 'eclimd)
If I add both lines at the beginning, it also works:
(add-to-list 'load-path "~/.emacs.d/elpa/emacs-eclim-20140809.207/") (package-initialize) (require 'eclim) (global-eclim-mode) ; If you want to control eclimd from emacs, also add: (require 'eclimd)
I wonder what the two lines I added do, and why they can work or not work? Thanks.