title: Emacs 24 Package System Initialization Problems
body: <p>It seems to me that the new Package system that is built-in on Emacs 24 has some flaws when it comes to properly loading and initializing the installed packages. </p>
  
  <p>Recently, I upgraded to Emacs 24.1.1 which was realeased on 6/10/2012 and I have been trying to use the built-in package system and have installed several packages using it, but they all have a similar problem related to autoload and initialization. </p>
  
  <p>For example, I use a package called <code>smex</code> which provides enhancements for using the <code>M-x</code> chord. It requires you to define a key for <code>M-x</code>, so I added <code>(global-set-key (kbd "M-x") 'smex)</code> in my <code>init.el</code> file. But after starting emacs I press the <code>M-x</code> chord and I get the message <em>"Symbol's function definition is void: smex"</em> ... If I also put <code>(require 'smex)</code> in my init.el file I get the error message <em>"File error: Cannot open load file, smex"</em> </p>
  
  <p>Adding the location of smex to the load-path variable makes it work as expected, however, that seems to defeat the whole purpose of having a package system in the first place... </p>
  
  <p>Any thoughts? Is there a better way or do we live with this limitation for now?</p>