doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.23k stars 3.03k forks source link

Doom profiles documentation: run doom env --profile #7955

Open AlessandroW opened 1 month ago

AlessandroW commented 1 month ago

I confirm that...

Expected behavior

After going through the documentation I expected that profiles work.

Current behavior

Weird things happen, e.g., magit complains that there is no emacsclient.

Steps to reproduce

Follow: https://github.com/doomemacs/doomemacs/tree/master/profiles/

Create a profile in ~/.config/doom-profiles.el:

;; -*- mode: emacs-lisp; -*-
((default (user-emacs-directory . "~/.emacs.d")
          (doom-user-dir . "~/.config/doom/default/"))))

To solve this, simply run: doom env --profile default. This should be documented (if it is the correct thing to do).

System Information

https://pastebin.com/KLdY39pR

hlissner commented 2 weeks ago

I'm not quite sure I understand the problem here. Are you expecting the default profile to be the same as the "global" profile? If so, see this section of the docs, there is no such thing as a "default" or "fallback" profile -- there are no magical profile names -- so it is necessary to specify the profile when running doom env if you want to update the envvar file for a specific profile.

AlessandroW commented 2 weeks ago

Maybe calling the profile default in the Issue was misleading..

No, my point was that after moving from a default config to a two-profile config, I had to run doom env for each profile otherwise strange things happened (env related, I assume), e.g., magit complained about a missing emacsclient. I didn't see it in the docs, hence this issue.