Open aspiers opened 11 years ago
This is similar to #1123, so clearly I am not the only one slightly confused by this ;-) My gut feeling is that el-get
shouldn't alter package-archives
without the user's permission, since other code outside el-get
depends on it, and the expectation has already been set that it is customizable via M-x customize
.
I think you're right and we should be hijacking package-archives
in the package.rcp
recipe. Will accept a patch for that.
Sorry for the delay - just coming back to this. I would love to be able to provide a patch, but I can't because I have no idea how el-get
is supposed to work with ELPA-like archives. Ideally I would be able to configure el-get
to install a package from (say) MELPA or Marmalade, if there is no native el-get
recipe for that package. Is that possible, and if so, how? I think it's really important that the user manual explains this in a way which doesn't require in depth knowledge of any of these approaches to packaging.
I can't help you for patching this. But if you need to install, via el-get
, a package from a specific ELPA repo you can use a recipe which look like this:
(:name solarized-theme
:type elpa
:repo ("melpa" . "http://melpa.milkbox.net/packages/")
:post-init (add-to-list 'custom-theme-load-path
default-directory))
@korthaerd Thanks a lot for the info! What's the post-init
required for?
@aspiers It's only for this recipe. You need at least the name, type and repo lines for a recipe from elpa.
Ah, I see. Thanks!!
I think el-get
also should not add all the archives by default. Preferably we should have customizable variable.
we should be hijacking package-archives in the package.rcp recipe.
@dimitri could you be specific what you mean here.?
Thanks
we should be hijacking package-archives in the package.rcp recipe.
@dimitri could you be specific what you mean here.?
I think "we should not be hijacking package-archives..." was meant (where "hijack" refers to the setq
destroying previous value of package-archives
). Also discussed in #799.
Yeah that was a typo.
If you specify the :repo
manually and it is not one of the default archives used by el-get then M-x el-get-update <package-name> RET
will fail with Wrong type argument: arrayp, nil
because it cannot find the associated package name in the archive-contents file.
I encountered this when trying to use el-get to retrieve the bind-key package on MELPA:
(:name bind-key :type elpa
:repo ("melpa" . "http://melpa.milkbox.net/packages/"))
Is there way of adding an archive to this default list used by el-get? Is MELPA compatible with el-get?
Discovered that this was actually just happening because of the package.rcp :post-init
logic that overwrites package-archives
which was mentioned above. My workaround is to add a post-step to my el-get-sources
list that directly follows package.el
:
; ...
(:name package)
(:name extra-package-archives :type no-op
:post-init (progn
; add additional package archives here!
(add-to-list 'package-archives melpa-archive t)))
; ...
@sonelliot Is your el-get
installation out of date? As far as I know this was already fixed a month ago by 40970c4 from #1455 (see also #799).
el-get can certainly work alongside MELPA (at least, since the above fix was merged). Here's how I do it:
https://gist.github.com/aspiers/8332731
followed by:
(require 'as-elpa)
(unless (file-exists-p (concat el-get-el-get-dir "/recipes/elpa"))
(el-get-elpa-build-local-recipes))
@aspiers https://github.com/dimitri/el-get/commit/40970c4 is certainly not working for me, package-archives
gets overwritten. What worked for me was to create an init-package.el
file and setting the variable there.
I am not an Emacs user so it might be my fault anyway.
Dismiss the previous comment. I deleted the el-get
folder and reinstalled from scratch and is working fine :+1:
@aspiers: You were right. I was using the stable, not master version, of el-get. I'm up-to-date now and problem solved! Cheers for the help.
Excellent :)
@dimitri I don't think this should have been closed, because there is still not any real documentation for how to use MELPA etc.
And I should really dispose of the idea of a stable branch, too.
Thanks :)
Done, current version is 5.1 and meant to be a rolling release. The installer defaults to the "master"
branch. I didn't remove the installer code around the el-get-master
idea to avoid breaking existing installation in a useless way, but I think it could be done.
The user manual doesn't mention Marmalade or MELPA. My system has
~/.emacs.d/el-get/el-get/recipes/elpa/melpa.rcp
but I can't figure out where it came from or what it does.