Reputation: 26647
I get the following error from emacs:
Warning (initialization): An error occurred while loading `/afs/nada.kth.se/hom\
e/d99/home/.emacs':
File error: Cannot open load file, jde
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.
I didn't use it for some time and the environment might've changed. What should I do? I don't think I have a .emacs file anymore, should I create one and what should it contain?
I do have a .emacs file (I was looking in the wrong dir) and it's
;; - - - - - - - - - -
;;
;; Emacs JDE
;;
(setq load-path
(nconc '(
"/pkg/jde/2.1.4"
)
load-path))
(require 'jde)
;; - - - - - - - - - -
;; - - - - - - - - - -
;;
;; Make possible to compile from inside emacs
;; using control-c -m
;;
(global-set-key "\C-cm" 'compile)
(setq load-path (cons "/src/lang/sictus/sicstus3.5" load-path))
(autoload 'run-prolog "prolog"
"Start a Prolog sub-process." t)
(autoload 'prolog-mode "prolog"
"Major mode for editing prolog programs" t)(autoload 'prolog-menu-hook-function "prolog-menu" t)
(add-hook 'prolog-mode-hook 'prolog-menu-hook-function)
How do I fix it?
Upvotes: 0
Views: 1126
Reputation: 16440
From the error message, it seems fairly likely that you do indeed have a ~/.emacs
file. Please double-check if this is the case or not. Whether it does or doesn't exist, try
$ emacs --no-init-file
which tells emacs to ignore your .emacs
file if any. If this causes an error, you might have something wrong in the emacs installation you're using. If emacs starts without errors, now try the suggestion from the error message you quote above:
$ emacs --debug-init
This will enter the emacs debugger at the point of the error in the init file. Even if you're not comfortable with the debugger, the backtrace might give you a clue as to what the problem is.
Added after the post was extended with the actual .emacs file:
In the particular ~/.emacs
file you show in the question, the immediate cause of the failure is the line
(require 'jde)
You can tell this by the line saying Cannot open load file, jde
. The most immediate way to eliminate this particular problem is by commenting out or removing the offending require line. As long as you don't actually need whatever it is jde
provides, this should fix you up. (You should probably also delete the previous expression that's trying to add something to the load path to let emacs find the jde
library.) If you need jde
, you want to figure out where it actually lives, and modify load-path
appropriately.
Upvotes: 1