Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document support for other ELPA-like package archives #1169

Open
aspiers opened this issue Apr 12, 2013 · 21 comments
Open

document support for other ELPA-like package archives #1169

aspiers opened this issue Apr 12, 2013 · 21 comments
Labels

Comments

@aspiers
Copy link
Contributor

aspiers commented Apr 12, 2013

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.

@aspiers
Copy link
Contributor Author

aspiers commented Apr 12, 2013

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.

@dimitri
Copy link
Owner

dimitri commented Apr 20, 2013

I think you're right and we should be hijacking package-archives in the package.rcp recipe. Will accept a patch for that.

@aspiers
Copy link
Contributor Author

aspiers commented Sep 20, 2013

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.

@ghost
Copy link

ghost commented Sep 20, 2013

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))

@aspiers
Copy link
Contributor Author

aspiers commented Sep 22, 2013

@korthaerd Thanks a lot for the info! What's the post-init required for?

@ghost
Copy link

ghost commented Sep 22, 2013

@aspiers It's only for this recipe. You need at least the name, type and repo lines for a recipe from elpa.

@aspiers
Copy link
Contributor Author

aspiers commented Sep 22, 2013

Ah, I see. Thanks!!

@yyr
Copy link
Collaborator

yyr commented Sep 25, 2013

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

@npostavs
Copy link
Collaborator

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.

@dimitri
Copy link
Owner

dimitri commented Oct 5, 2013

Yeah that was a typo.

@egbulmer
Copy link

egbulmer commented Jan 9, 2014

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?

@egbulmer
Copy link

egbulmer commented Jan 9, 2014

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)))
    ; ...

@aspiers
Copy link
Contributor Author

aspiers commented Jan 9, 2014

@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))

@antonio
Copy link
Contributor

antonio commented Jan 9, 2014

@aspiers 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.

@antonio
Copy link
Contributor

antonio commented Jan 9, 2014

Dismiss the previous comment. I deleted the el-get folder and reinstalled from scratch and is working fine 👍

@egbulmer
Copy link

@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.

@aspiers
Copy link
Contributor Author

aspiers commented Jan 10, 2014

Excellent :)

@dimitri dimitri closed this as completed Jan 11, 2014
@aspiers
Copy link
Contributor Author

aspiers commented Jan 11, 2014

@dimitri I don't think this should have been closed, because there is still not any real documentation for how to use MELPA etc.

@dimitri dimitri reopened this Jan 11, 2014
@dimitri
Copy link
Owner

dimitri commented Jan 11, 2014

And I should really dispose of the idea of a stable branch, too.

@aspiers
Copy link
Contributor Author

aspiers commented Jan 11, 2014

Thanks :)

@dimitri
Copy link
Owner

dimitri commented Jan 11, 2014

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.

@npostavs npostavs added the docs label Mar 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants