Doom Emacs on Windows - Generating autoloads does not terminate when installing packages

455 Views Asked by At

I have a running Doom Emacs configuration on my Linux machine. On my Windows machine I applied roughly the same config, which works for the most part. But whenever I try to install packages using install-package RET some-package-name RET the process does not terminate and emacs freezes. Waiting for some time fills up my ram. The last message is Generating autoloads for ~/.emacs.d/.local/elpa/..., where ... is an .el file, sometimes it is the package I try to install, other times it is some other package.

So far, I had the same problem whatever package I tried to install.
Running doom doctor reveals no problems.

1

There are 1 best solutions below

2
Martin Baulig On

Doom Emacs does not use the traditional install-package, but instead comes with its own package manager.

If you go to your Emacs config directory, then you should see a packages.el file and a config.el file.

The package.el specifies which packages to load, for instance

(package! org-auto-tangle)

(package! org-appear
  :recipe (:host github
           :repo "awth13/org-appear"))

(package! visual-fill-column)

(package! info-colors)

You then provide package-specific configuration in your config.el, for instance:

(use-package! org-auto-tangle
  :defer t
  :hook (org-mode . org-auto-tangle-mode)
  :config
  (setq org-auto-tangle-default t))

(add-hook! org-mode :append
           #'visual-line-mode
           #'variable-pitch-mode)

You need to run doom sync each time you made any modifications there.

Check out this section it the Getting Started Guide for more details: https://github.com/doomemacs/doomemacs/blob/master/docs/getting_started.org#package-management

There is no ~/.emacs.d/.local/elpa/... directory in Doom Emacs and according to the documentation linked above, manually installed packages will be forgotten when you restart Emacs and uninstalled next time you run doom sync or doom purge.