vfclists · 2022-09-26 09:01
**UPDATE:**
Sorry guys I think I suffered some misconception that personal module customizations had to be done in the main `.emacs.d` directory. I confused the `~/doom.d` directory mentioned at [Doom : Writing your own modules](https://github.com/doomemacs/doomemacs/blob/master/docs/getting_started.org#writing-your-own-modules) with the `~/.emacs.d` directory where the Doom source/installation is cloned to. [More])https://www.reddit.com/r/emacs/comments/xodxat/doom_users_how_do_you_manage_doom_settings_in_the/iq700xx/)
`===================`
*Original Question*
I want to make some changes to my Doom settings, not those in the $DOOMDIR, but in the `.emacs.d` where doom's code is stored.
I'm starting with `early-init.el`, and may add my own modules later, but I'm worried that when I update doom from the repo some of my settings will be overwritten.
The logical thing to do it seems is to create my own branch of the original clone and make my own changes there. Then when I want to upgrade, I switch to the original master, pull the new changes, and cherry-pick the parts I need that don't conflict with my changes etc, but my git-fu is weak.
Any experiences or advice in that respect? Are there some things to do or avoid that will make things easier?
PS. I am also on the master branch which says `3.0.0-pre` although the latest stable tag `2.0.9`. Does that make much of a difference?
mtndewforbreakfast · 2022-09-26 12:41
I would first try to make quite sure that whatever (re)configuration you desire to perform is not possible without code changes in that locale. In ~5 years of being a Doom user I've never encountered something I wanted to tweak that couldn't be done in my own userspace config folder.
lj-read-it · 2022-09-26 14:40
Yeah I don't Doom but op felt off for me for this reason. It would be just bad design for users to have to hardcode their configurations and even create forks for most things. OP, it might help to discuss exactly what you're trying to achieve so other Doom users can tell whether you really need to fork the code.
manithree · 2022-09-26 15:55
Agreed. Sounds like an [XY problem](https://xyproblem.info/).
lj-read-it · 2022-09-26 16:42
Ooh TIL!
my_bad_name · 2022-09-26 17:00
Short answer: don’t. Configure everything via `setq` and friends in $DOOMDIR/config.el. Everything else is a way into madness.
Schievel1 · 2022-09-26 17:46
Just put the functions and variables you want to change in Cobfig.el in doomdir and it will overwrite them in . Emacs.d
You don't edit .emacs.d, because indeed it will be overwritten. In fact when you made changes there's and you run doom upgrade it will block the update and tell you.
You do your edits in .doom.d that's what it's for
wulfAlpha · 2022-09-26 17:47
The doom guys actually solved this pretty easily i think. Doom automatically looks for your configuration in .config/doom if it exists. And that .config/doom location overrides other locations. This way updates don't override things :(
wulfAlpha · 2022-09-26 17:49
Oof I miss read your comment and posted the same thing. Sorry fellow Doon user.!
holgerschurig · 2022-09-27 00:47
> I want to make some changes to my Doom settings, not those in the $DOOMDIR, but in the `.emacs.d` where doom's code is stored.
You didn't give a reason why you want to intentionally do that. You can have your own modules without touching early-init.el. gagbo recently made a post (or was it a video?) about private modules.
In any case, if you absolutely must do that (hint: you mustn't, .doom.d/config.el can change all of doom), then you can just use git. Create a branch, make your changed there. When Doom updates, pull it into master. Then *merge* (not cherry-pick!) that into your branch. Work *with* git, not against it.
This is however so much extra work, that we are back to square on: do your things in your config.el in .doom.d/
vfclists · 2022-09-28 03:39
Sorry guys I think I suffered some misconception that personal module customizations had to be done in the main `.emacs.d` directory. I confused the `~/doom.d` directory mentioned at [Doom : Writing your own modules](https://github.com/doomemacs/doomemacs/blob/master/docs/getting_started.org#writing-your-own-modules) with the `~/.emacs.d` directory where the Doom source/installation is cloned to.
I think the docs should be updated to replace `~/.doom.d` with `$DOOMDIR` and `~/.emacs.d` with $EMACSDIR because they presume that the user has only one Doom or Emacs installation and that the code will be always installed in `~/.emacs.d` and the user's configuration will be installed in `~/.doom.d.
Or perhaps `$PROFILE_EMACSDIR` and `$PROFILE_DOOMDIR`as the user may have multiple profiles. Then of course you may also have `$PROFILE_EMACSBINDIR` because the user is running different versions of Emacs.
This is an issue that applies to many different in IT projects besides Emacs where a proclivity to set or follow conventions for the sake of getting up and running undermine deeper understanding of the underlying model, not to mention that I probably have to enlarge the fonts when I'm reading documentation. It is an something I've always wanted to blog about but never got round to. Git howtos I'm looking at you.