I understand this has been asked before... I've done some research and found that emacs25 is not worth the transition. However I can't install many packages because they depend on it.

Is there a way I can update the package repository to look at a repository that does not depend on emacs25?

  • Why isn't the the transition isn't worthwhile? It looks like Debian 9 has a package for emacs25, you could just install it from the repo and use all the packages you like.
    – Tyler
    Apr 26 '19 at 19:20
  • Do you want to use a package from an older version of Debian? If so, this question isn't really about Emacs itself.
    – user12563
    Apr 26 '19 at 19:44
  • 2
    "a repository that does not depend on emacs25" - I think the main problem is that no such thing exists at the moment, you'd have to make one yourself.
    – npostavs
    Apr 27 '19 at 0:49
  • n.b. You don't need to use package.el at all. It's a (relatively recent) convenience, rather than a necessity. Whatever libraries you wish to install, you can usually download them from their source repository, and you can usually obtain an older version that way -- so you can look back in the history to identify a version which ran on your version of Emacs (assuming the library dates back far enough), download that, set it up manually, and commit it to your Emacs config.
    – phils
    Apr 27 '19 at 1:33

Package repositories for package.el do not depend on emacs 25. It looks, like you mix up distribution and emacs repositories. So let me explain a bit.
I will simplify everything a bit, so the text does not get too long. Also, I will use the term extensions for emacs packages.

You have to distinguish 2 things: Emacs and your Linux distribution (i.e Debian, Ubuntu, Fedora, ...).

Both things come with a package manager and packages, which they load from repositories. But both work on different repositories and with package formats, which are incompatible to each other. Nevertheless both provide extensions for emacs.

Lets have a look at your distribution. You most probably installed programs (maybe even emacs) from here. You do this by using programs called apt-get, aptitude or whatever. Your distribution offers emacs extensions, but probably not very recent ones. You can install those extension from here and automatically get programs which they depend on (and are not part of emacs). Everything you get from here works with the Emacs version you can install from here. The number of emacs extensions you can get from here is rather low.

Then there is emacs. You can install emacs extensions from here, too. You can use the built-in package.el extension to do so. Use M-x list-packages to open the package manager. package.el pulls its packages from GnuELPA, MELPA and other repositories. Those packages are more recent. And are directly created from things like github. package.el always depends on the emacs version you are using (because it is built-in) and shows you, when a package is incompatible with your emacs. The number of different emacs extensions you can get from here is rather big. You may be required to install additional (required) programs from your distribution yourself.

With both described methods you can only install fixed package versions (until the package gets updated) To install older or more recent versions, you need to dismiss package.el and your distributions package manager and pull the source code for your extensions directly from the git repository (there are several helper extensions available from within emacs like borg).

TL;DR: So what you want to do, probably, is: setup package.el to know the MELPA repository and then install extensions from within Emacs:

(setq package-archives '(("Gnu" . "https://elpa.gnu.org/packages/")
                         ("Melpa"   . "https://melpa.org/packages/")))

Edit: to reflect the updated question: packages at MELPA and other repositories depend on extension source code (which often comes from github). Every developer of an extensions, alone, decide, which emacs version is the minimum requirement.
So if you want to install packages for older emacs versions (i.e. emacs 24), you need to fetch an older revision directly from those source code (github) repositories. Also, you could try, if a current package version works with an older emacs version, despite its official requirement. (I had (and solved) such an issue with the extension minions, it works with my older emacs version, despite its requirement). For this work, another package manager than package.el could be of use. To name some: borg, el-get, straight. Have a look at straights repository to get a good overview.
Other than that, I think there is no ready-to-use solution for your issue.

  • I updated the question to make it make more sense. I just wrote it poorly.
    – Dellowar
    Apr 28 '19 at 20:16
  • @SanchkeDellowar I updated my answer. If thats not the info you need, then maybe you should get more specific in you question. (i.e. name the emacs version you use)
    – jue
    Apr 28 '19 at 21:12

We could create a new package archive (say "OLD GNU ELPA") in (say) https://elpa.gnu.org/old-packages/. The packages themselves are actually already in https://elpa.gnu.org/packages/, so all it takes is to figure out which ones should be in the new archive and create symlinks for them, basically (plus construct the corresponding archive-contents file).

Patches against elpa.git's admin/archive-contents.el that implement such a feature would be very welcome.

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.