Every time I open emacs I run the following set of commands:


I wanted to set things up so this happens automatically

I put the following things ~/emacs.d/init.el file

(load-theme 'danneskjold t)

I get the following error message:

Warning (initialization): An error occurred while loading ...init.el

Symbol's function definition is void: package-initialize

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.

Also tried the following in init.el file

(load-theme 'danneskjold t)

Get a different error message:

Wrong number of arguments: #[(theme) ^H\211^X   >)\203^_^@\304^H!\210\305^H\306\307#\210\305^H\310\307#\210\305^H\311\307#\210\312!\203+^@^KB\202,^@^K^[\313\314\315^H!!!)\207
[theme custom-known-themes custom-theme-directory load-path disable-theme put theme-settings nil theme-feature theme-documentation file-directory-p load symbol-name custom-make-theme-feature] 5 1722891 SCustom theme name: ], 2

Not really sure what all the symbols are supposed to mean, is there something else going wrong with my emacs?

  • 3
    I think you're missing (require 'package) before (package-initialize) Dec 28, 2016 at 15:53
  • @FelipeLema I do this and get the following error: File error: Cannot open load file, package. Thanks for your help so far!
    – par
    Dec 28, 2016 at 16:02
  • Have you tried emacs suggestion to start with the --debug-init option?
    – JeanPierre
    Dec 28, 2016 at 17:39
  • 4
    You're apparently using an Emacs < 24, where package.el is not bundled. As for the load-theme problem, just don't pass the t argument.
    – Stefan
    Dec 28, 2016 at 17:40


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.