Discussion:
elpa package loading problem?
(too old to reply)
Xah Lee
2012-06-02 16:44:29 UTC
Permalink
does anyone have problems with emacs package system?

recently, installed several packages with it: {“rainbow-mode”,
“bookmark+”, “smex”, “expand-region”}.

But they all have a similar problem related to autoload. For example,
let's say rainbow-mode. When in css, it's not loaded. You have to
manually call it. So, if you want it to load automatically when in
css, you have to add stuff to your init file. Then, this means the
package system does not really automatically manage things. You still
have know some elisp, and manually add things to your init file. (we
talking about basic activation, not advanced customization)

The issue is more pronounced with modes such as bookmark+, smex,
expand-region. For example, in bookmark+, when i start my emacs, call
bookmark 【Ctrl+x r l】, it gives a error about some current-bookmark-
file var not defined. Apparently, the problem is that bookmark+ must
be properly initialized before i start my bookmark. (when calling
bookmark-bmenu-list, it does automatically load bookmark+, but isn't
properly initialized) Here, i've spent some 20 min but haven't
succeeded in making it work. (i suppose i'll need to take time to
understand how elpa loading mechanism works.)

Similar things happen with smex, expand-region. For example, smex
requires you to define a key for M-x. So i added (global-set-key (kbd
"<apps>") 'smex) in my init. But after starting emacs, i press the
apps key, i get: “Symbol's function definition is void: smex”. If i
put (require 'smex), restart, i get “Debugger entered--Lisp error:
(file-error "Cannot open load file" "smex")”. Next step is to add the
load path, which i haven't tried yet. But that seems to defeat half of
goodness of package system.

Any insight on this?

for emacs 24, is this the way things are?
jpkotta
2012-06-04 15:05:25 UTC
Permalink
Post by Xah Lee
does anyone have problems with emacs package system?
recently, installed several packages with it: {“rainbow-mode”,
“bookmark+”, “smex”, “expand-region”}.
But they all have a similar problem related to autoload. For example,
let's say rainbow-mode. When in css, it's not loaded. You have to
manually call it. So, if you want it to load automatically when in
css, you have to add stuff to your init file. Then, this means the
package system does not really automatically manage things. You still
have know some elisp, and manually add things to your init file. (we
talking about basic activation, not advanced customization)
The issue is more pronounced with modes such as bookmark+, smex,
expand-region. For example, in bookmark+, when i start my emacs, call
bookmark 【Ctrl+x r l】, it gives a error about some current-bookmark-
file var not defined. Apparently, the problem is that bookmark+ must
be properly initialized before i start my bookmark. (when calling
bookmark-bmenu-list, it does automatically load bookmark+, but isn't
properly initialized) Here, i've spent some 20 min but haven't
succeeded in making it work. (i suppose i'll need to take time to
understand how elpa loading mechanism works.)
Similar things happen with smex, expand-region. For example, smex
requires you to define a key for M-x. So i added (global-set-key (kbd
"<apps>") 'smex) in my init. But after starting emacs, i press the
apps key, i get: “Symbol's function definition is void: smex”. If i
(file-error "Cannot open load file" "smex")”. Next step is to add the
load path, which i haven't tried yet. But that seems to defeat half of
goodness of package system.
Any insight on this?
for emacs 24, is this the way things are?
You probably need to run package-initialize near the beginning of your init file.
Loading...