This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-02
Channels
- # announcements (3)
- # asami (29)
- # babashka (62)
- # beginners (131)
- # biff (7)
- # calva (31)
- # cider (5)
- # clerk (14)
- # clj-kondo (3)
- # cljsrn (12)
- # clojars (18)
- # clojure (72)
- # clojure-austin (17)
- # clojure-dev (6)
- # clojure-europe (31)
- # clojure-indonesia (1)
- # clojure-nl (1)
- # clojure-norway (18)
- # clojure-sweden (11)
- # clojure-uk (6)
- # clr (47)
- # conjure (42)
- # cursive (88)
- # datalevin (2)
- # datomic (25)
- # emacs (42)
- # exercism (1)
- # fulcro (10)
- # funcool (8)
- # gratitude (2)
- # honeysql (16)
- # introduce-yourself (5)
- # jobs-discuss (26)
- # leiningen (5)
- # lsp (31)
- # malli (21)
- # matcher-combinators (14)
- # missionary (2)
- # nbb (1)
- # off-topic (40)
- # pathom (38)
- # portal (2)
- # re-frame (7)
- # reagent (18)
- # reitit (1)
- # releases (5)
- # shadow-cljs (62)
- # sql (12)
- # testing (4)
- # xtdb (37)
I need help debugging an issue that's been plaguing my emacs config for years. Whenever I install a new package with package-install
I get an error message:
signal(wrong-type-argument (stringp (require . package)))
Here's the backtrace: https://gist.github.com/pesterhazy/0612322028ef92d109769616cf80b661I think it's probably some configuration setting or package that I've installed that's somehow interfering with the functioning of package-install
, but I'm having a hard time parsing the backtrace
AIUI the exception (I think that's what signal means here?) occurs in a byte-complied package, package.el
(That's why, sadly, there are no line numbers here)
Something is expected to be a string, but isn't
But I don't know what
(require . package)
meansIs that "dotted pair notation" for cons cells? What does that have to do with anything??
In any case, the problem appears to be in the function
package--with-response-buffer-1
which processes a response from the server, presumably the package coming back from elpa. But my understanding ends there. I don't see any calls to require
in that fnI just tried with a near-empty init.el, and the error still appears!
emacs 28.1
But I swear I've seen this in older versions as well, as far back as a couple of years ago
Hm, I just saw that package-refresh-contents
also fails
Contacting host:
Package refresh done
Failed to download 'melpa' archive.
This is all of my init.el
(require 'package)
(add-to-list 'package-archives '("melpa" . " ") t)
(package-initialize)
maybe some emacs update that re-uses some outdated code from the load-path or something
Is there some cache I could delete?
Aha, now it feels like I'm getting somwhere. I deleted .emacs.d
, now it seems to be working
Something about my .emacs.d
must be causing this
did you try to load emacs without loading the conf at all and just eval the code you mentioned?
let met try emacs -Q
OK so it works with -Q
, but breaks without -Q
Ok, great suggestion. So it really is --no-init-file
The crazy thing is this happens even if the init.el is empty
I distilled it down to installing a package from GNU elpa, so I don't even have to add MELPA to repro the problem
but I don't have a custom.el - maybe I'm not understanding?
I just started from a completely empty .emacs.d
It also works if I delete .emacs.d/elpa before installing stuff
OK here's a description of the error, and the workaround described fixes the problem https://www.reddit.com/r/emacs/comments/flb0vc/comment/g13izoy/
So the problem seems to be with certain macos builds of emacs. I upgraded to the latest Emacsformacos build 28.2 and that also seems to fix the issue, no editing up loadup.el necessary
But wow, what a weird problem