7

When I do M-x package-install RET magit it installs the latest version of magit which is 2.1.0.

I want to install magit 1.4.2. I don't want to do it manually by downloading and loading package.

For example, if I am downloading a python package, I can specify version number while installing.

pip install django==1.8

How can I do something like that and install magit=1.4.2?

  • 1
    AFAIK, Melpa doesn't deal in official releases, and you're not actually getting version 2.1.0 -- you're getting the latest (maybe unstable) code from the source repository, which will probably refer to itself as 2.1.0 if there hasn't been a subsequent official release, but which isn't the same code as that official version. Use a different package repository if you want official releases (try Marmalade or Melpa-Stable). – phils Jul 27 '15 at 4:52
  • @phils Is there a way to install an old release from melpa stable? – ChillarAnand Jul 27 '15 at 4:59
  • I'm not seeing an obvious way, I'm afraid. In this scenario, the maintainer might have to register a second package (e.g. magit-1.x vs magit-2.x). I suspect that you'll have to use an alternative approach for installation. I'm not too familiar with the package manager, though, so someone else may know better. – phils Jul 27 '15 at 5:15
12

You can't install a previous version of a package in our current infrastructure. Even though Emacs’ built-in package manager now supports multiple versions of a package in recent releases, no popular package archive (i.e. MELPA Stable and Marmalade) actually keeps a backlog of previous releases.

Emacs didn't support this for a long time, and now that it does, the demand for this feature seems to be rather low—as it is generally for versioned releases, considering that MELPA Stable is far less popular than MELPA itself. Notably, none has yet volunteered to work on a backlog of releases for MELPA Stable, and consequently there's little incentive for the maintainers to implement it.

You'll have to download, build and install the package yourself. QUELPA with a custom recipe for Magit will probably help here.

  • Is it still the case, four years later, that it's not possible to install a historical release from MELPA stable? If so, how do people prevent bad MELPA releases from breaking their entire emacs setups across every machine they use? – Tom Ellis Nov 17 at 8:15
  • @TomEllis I don't know, but uhm, why don't you find out yourself? It's easy enough isn't it? – lunaryorn Nov 18 at 9:14
  • I'm not sure I understand. This is a question and answer site and I'm asking if the question originally asked has a new answer (and giving a rationale for why one might want a new answer). How would you suggest I find out for myself, short of asking here? – Tom Ellis Nov 18 at 10:48
  • @TomEllis No offence meant, but you can really just check the package archive contents of MELPA yourself, e.g. via M-x list-packages in Emacs. If you find that my answer needs an update, feel free to propose an edit afterwards. – lunaryorn Nov 18 at 14:22
4

You can use el-get to install any specific revision of any package, from a git repo.

(el-get-bundle git-timemachine
  :checkout "3.0")

This will clone git-timemachine from github and checkout tag 3.0 and require git-timemachine.

  • Is this feature still supported? I tried to install a previous version of magit (their current version does not support emacs 24 anymore) by running the following: (el-get-bundle! magit :checkout "2.90.0") in scratch buffer, and only got error messages (error "El-get can not find a recipe for package \"package\"") – menuhin Jun 8 '18 at 16:21
  • It works without the exclamation mark: (el-get-bundle magit :checkout "2.90.0") Please amend your answer. Thanks. – menuhin Jun 8 '18 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.