anyone tried to add a network timeout to these?
(package-refresh-contents)
(package-initialize)
I believe they can cause Emacs startup to hang, if melpa/etc are having a bad dayAre those things you want to call at startup anyway?
you're probably better off using something like straight (rock solid) or elpaca (more bleeding edge) to have more control over this (and locking/pinning)
they are also melpa compatible, it's quite easy to port to it
Thought it was something everyone would do I enjoy having an idempotent setup that does everything for me... but yeah next time I'll see if disabling those does the trick
I apparently have
(unless package-archive-contents
(package-refresh-contents))
in my init. The goal being to get the first launch on a new pc working but not otherwise.@vemv This is how I use straight.el to have an idempotent setup: https://gist.github.com/iarenaza/ad2f19252ff33148902081a8e8317784 (The files in there are the ones I use, except for init.el, which I trimmed down a bit before adding it to the gist).
Thanks for the pointers folks! Yeah maybe it's time to move to Straight, I have a good opinion of it. I was just quite attached to my old setup (melpa + git submodules) which served me well for so long 🫡
Note that, if you are on Emacs 30 or later, use-package can now use version controlled sources for package installations (in addition to package repositories like ELPA, MELPA, etc). So, in theory, you could achieve the exact same thing that you can get with straight.el. I haven't done it yet, but I intend to rewrite my configuration that way. So I can get rid of straight.el, and do the whole thing with the integrated use-package features.
straight makes it a bit more streamlined
No fuss bulk upgrades/pinning etc