1

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.

Drew
  • 29,895
  • 7
  • 74
  • 104

1 Answers1

1

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.

danronmoon
  • 3,814
  • 5
  • 34
  • 56
Martin Baulig
  • 3,010
  • 1
  • 17
  • 22
  • I suspect the hang that you’re getting is because Doom Emacs overrides some of the package loading logic - to make it work with it’s setup - and when you try the old `package-install, that might get confused somehow. Try the recommended installation that I described above and see whether that fixes it for you. – Martin Baulig Apr 23 '23 at 21:04
  • Thank you! I did not know doom would forget the packages installed via `package-install`. I always installed the package via the command first and then add it to `package.el`. Do you have any idea why this problem only occurs on Windows and not on Linux? – d_o_m_i_n_i_k Apr 24 '23 at 09:10