I'm using the awesome use-package and the awesome straight.el to manage packages.

I'd like to use xahk-mode. I've checked in the 'repos' directory of straight and I can see a folder named xahk-mode so I think it's locally available to straight.el.

However, when I try to execute

(use-package xahk-mode)

I get the error message:

Error (use-package): Cannot load xahk-mode

I'm using use-package and straight.el to load packages elsewhere (successfully), and I've got these in my config file:

(straight-use-package 'use-package)
(setq straight-use-package-by-default t)

The error message that I'm seeing doesn't make a whole lot of sense - is there any way to get more detailed information about what went wrong? (And/or - does anyone have any advice on what to look for / try in order to fix this?)

  • 1
    I have just tried it and it works without problems on my computer.
    – serycjon
    May 4 '20 at 9:42
  • 1
    Is the directory in your C-h v load-path ?
    – phils
    May 4 '20 at 10:53
  • @phils - yes. In fact, it's first. May 4 '20 at 17:02
  • @serycjon - Thanks for the confirmation! I'm pretty confident this is something I messed up all by myself - I'm mostly looking for advice on how to figure out what I messed up :) May 4 '20 at 17:03
  • Without really guessing at what the issue might be, I would try (1) M-x straight-pull-package / straight-rebuild-package and variants, (2) deleting that folder on disk and re-launching Emacs with your use-package in place in your init config, (3) deleting the entire repos folder and restarting Emacs.
    – mindthief
    Dec 30 '20 at 2:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.