Doom-emacs: [REQUEST] anyway to install package without straight?

Created on 30 Aug 2019  路  4Comments  路  Source: hlissner/doom-emacs

Currently I'm working on a machine with limited access to the internet. I used to modify the package-archives variable and update packages via a mirror.

However, straight seems to download packages from GitHub directly. And it will takes a long time from my machine even after using a proxy server. For example, downloading three packages spent up to seven minutes to finish:

image

So, is there anyway to continue using the legacy way for installing and updating packages?

question packages

Most helpful comment

Actually, the best solution is to tell straight to download source directly instead of cloning them.

I don't think it's a good idea to keep a local git repo for each package. Every time I update my package, there're immediately tons of git command running in the background and my computer quickly get 100% cpu and freeze out for a few seconds.

I'm now still reading about the document and I will probably create a new issue on that.

All 4 comments

Sorry to say, package.el as a backend for package management has been done away with (almost) entirely. You can still install individual packages with its API (through M-x package-install or use-package's :ensure keyword), but there is no way to tell Doom to "install all its packages through package.el" anymore.

I'll see if I can find a way around it, but I'm not sure how to best address this issue.

Actually, the best solution is to tell straight to download source directly instead of cloning them.

I don't think it's a good idea to keep a local git repo for each package. Every time I update my package, there're immediately tons of git command running in the background and my computer quickly get 100% cpu and freeze out for a few seconds.

I'm now still reading about the document and I will probably create a new issue on that.

I've added a --threads N switch to doom update. You can use this to reduce the amount of system resources it uses (by default it spawns 8, so try 2), but the time it'll take will increase considerably. If you find threads timing out, try using --ttl SECONDS (the default timeout is 45).

e.g. doom update --threads 2 --ttl 60

Was that your only misgiving about git repos?

I've added a --threads N switch to doom update.

Thanks for your update! I had tried to run doom update with only one thread and a much longer timeout, like 1000 seconds. But straight still complained about threads timing out:
Screenshot_20190913_125355

Was that your only misgiving about git repos?

Just a little. Using git is just a trade-off: elpa only serves the latest packages and we have to use git to lock a package for a specific version.

What I really don't like, is straight itself. Thread keeps timing out when running doom update and straight won't tell you anything about it, like it just happens for no reasons.

Even a snippet which simply cd into each subdirectory and run git pull:

# for fish shell
for i in *
  pushd $i
  git pull
  popd
end

performs better and gains more details:

Screenshot_20190913_133051

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benjaminbauer picture benjaminbauer  路  3Comments

Ptival picture Ptival  路  3Comments

randomizedthinking picture randomizedthinking  路  3Comments

pieterdd picture pieterdd  路  3Comments

governorgoat picture governorgoat  路  3Comments