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