1

I have Emacs 24.3 running on Raspbian. I'm kind of enjoying running Emacs on Linux - seems to be a beter fit than on Windows. I installed the very useful key-chord package using the usual package functions. This results in a directory in ~\.emacs.d\elpa\key-chord-20080915.2156.

Then I inserted the following in my init file:

(require 'key-chord)
(key-chord-mode 1)

This kicks out the following error:

File error: Cannot open load file, key-chord

However, if I hit M-x I can find all the key-chord functions and run key-chord mode and associated bits and pieces. What am I doing wrong...?

SlowLearner
  • 7,907
  • 11
  • 49
  • 80

1 Answers1

1

Emacs loads the installed packages after evaluating your init file. If you need your packages in your init file, you can use (package-initialize) to manually initialize the packages.

The reason you see some or all key-chord functions is that these functions are "autoloaded". You don't need a require to use these functions; in fact, the package is automatically loaded when you use such a function.

olaf b
  • 606
  • 4
  • 6
  • See http://stackoverflow.com/questions/11127109/emacs-24-package-system-initialization-problems before using `(package-initialize)` (but as olaf points out, there's no need for it in this instance). – phils Aug 29 '14 at 01:55
  • Thank you for this. I put a `(package-initialize)` before the `key-chord` call and now it works fine. – SlowLearner Aug 29 '14 at 05:37