help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elpa package loading problem?


From: Easior
Subject: Re: elpa package loading problem?
Date: Thu, 29 Nov 2012 15:09:52 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

>>>>> "XL" == Xah Lee <address@hidden> writes:

    XL> does anyone have problems with emacs package system?
    XL> recently, installed several packages with it: {“rainbow-mode”,
    XL> “bookmark+”, “smex”, “expand-region”}.

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

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

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

    XL> Any insight on this?

    XL> for emacs 24, is this the way things are?

It's just my question. 

However, I also found something strange with package.el in emacs 24.
I installed command-frequency.el, info+.el, maxfame.el etc, by elpa.
Those package couldn't load properly if I add the following lines:

,------------------------------------------------
| (require 'command-frequency)
| (eval-after-load "info" '(require 'info+))
| (require 'maxframe)
| (add-hook 'window-setup-hook 'maximize-frame t)
`------------------------------------------------

to the file ~/.emacs. The *Bugtrace* reports that

If I adjust my dotemacs file as follows

,------------------------------------------------
| ;; (require 'command-frequency)
| ;; (eval-after-load "info" '(require 'info+))
| ;; (require 'maxframe)
| (add-hook 'window-setup-hook 'maximize-frame t)
`------------------------------------------------

then the maxframe.el works well while command-frequency.el and
info+.el didn't take any effects. I found those files named
<package>-<autoloads>.el when I entered into the elpa directory.
Based on these facts, I understand that 

* packages installed by elpa couldn't required in ~/.emacs since
  they would be autoloaded through the autoloads files. Furthermore,
  the autoloads files are generated from the ;;##autoload lines in
  package sources.
* maxfame.el works since the function, maximize-frame, is in the
  autoloads file.
* command-frequency.el doesn't work because there is nothing in its
  autoloads file. 

Is it right? 

Question: 

Is there a way to make info+.el, command-frequency.el run by elpa?
What can I do?

Thanks in advance.

Best regards,

Easior
-----
Ich bin von heute und ehedam, aber etwas ist in mir, das ist vor
morgen und übermorgen und einstmal.

                                     Friedrich Wilhelm Nietzsche




reply via email to

[Prev in Thread] Current Thread [Next in Thread]