I always update my Emacs packages on Sunday. I’ve found that upgrading once a week is more than enough and helps limit the ever-increasing entropy here at Irreal. This past Sunday, I noticed that there was a new Org-mode in ELPA. Because Org is central to my workflow, I’d taken to using the GNU ELPA version rather than the more up to date but maybe not quite stable version from the Org repository.
When I tried to update the packages, the update aborted because it couldn’t load the new Org-mode. It said there had been a bad request. I took that to mean that the tar file was missing for some reason or another and put off upgrading until Monday. But on Monday the same thing happened. Finally, on Tuesday I saw a tweet pointing to a reddit discussion of the problem.
It turns out that there is a problem downloading from the GNU archive that’s related to TLS. Happily, the answer is simple: just add
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
to your init.el
file.
Oddly, it turned out that I already had that line but it was commented out and replaced by a line that set gnutls-algorithm-priority
to nil
. I vaguely remember changing it to nil
some months ago because of a security problem with gnutls
. Presumably that’s been fixed now. I switched the commenting on the two lines, evaluated the uncommented one, and when I invoked the update function everything worked fine.
If you’re getting weird errors when you download from the GNU repository, try adding the above line to your file. It worked well for me.