-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emacs calls doom incorrectly #40
Comments
Couple of things going on here... Question: what do you want/expect In vanilla Doom, you'd usually use this to test changes you made in your (mutable) Is that what you want / expect? I don't want to spend too much time trying to make this not error out if the end result isn't going to be useful, and if that is what you want I'd be inclined to override Background: First, This makes sense if your
Although it succeeded, strace shows it tried and failed to delete /nix/store/bbi1l0wy5219j2d76iv6ryw3l2n4in3d-doom-profile/profile/@/0/init.29.el, and with DEBUG=1 I get
after which it fails. The first half says "0 packages" because it's reading the packages.el Unstraightened generated, which is telling Doom not to package-manage anything (because we're doing that for it). That means a profile init file generated by Doom is going to be incomplete (we extend that step...), but fortunately it tries to write the incomplete profile to the store, which it can't. Next, So at that point we break in the way you identified: that inner Emacs doesn't have the packages we added, so we fall over (the first one we hit being So we can try to fix that bit, but the absolute best case scenario is " The next bit Something similar applies to |
Right, forgot to mention that. I have been working on a patch that would make doom use |
Ah, I think I see. ...but although I'm not sure yet whether you're going for "reload config.el from During normal startup (as you may have had to track down already), loading I think that'd work if you're just changing config.el, I'm not sure to what extent it'd work if you're changing packages.el / init.el... Might need to try and see. And although you could reload config.el more directly, your home-manager switch is going to have to reinstantiate doom-profile anyway, so I suspect you might as well reload its profile init file and have that reload config.el for you. ...does that sound right, or am I misunderstanding what you're reloading / symlinking? |
Yep, seems to match my experience. I later figured out this process is way more convoluted than what I thought initially. Still, a better way to iterate on the configuration would be nice to have. |
Not sure how much better we can really do... when tinkering with my own config, I'm usually editing just config.el or some adjacent file (in which case I directly re-evaluate that file while iterating) or I'm enabling a new Doom module or adding a new package (in which case I need to rebuild and restart anyway to get the new dependencies). It's nice that these emacsWithPackages and Doom profile instantiations are completely isolated from each other (so your running instance doesn't pull in some undefined mix of dependency versions if you upgrade while it's running, and you can run the old and new one in parallel), but it does have the downside that they're completely isolated from each other (so you more or less have to start that new instance, reloading in place gets complicated)... |
Commands like SPC-h-r-r call the original doom with EMACS pointing to the original Emacs, which causes obscure issues. I patched doomemacs while debugging an issue I had to call my debugging utility instead of doom, here's the result:
Passing these EMACS and DOOMLOCALDIR to that doom executable is enough to reproduce the issue I had with SPC-h-r-r:
Note:
/nix/store/09391jc8xazy2mrjhmca0xzblrmxm9iz-source/
is thedoomSource
and/nix/store/ysr370j2nylqbvwmnk2y3w2hfm0w09ky-emacs-pgtk-29.4/
is the original Emacs I use forprograms.doom-emacs.emacs
(pkgs.emacs29-pgtk
)Possible solution
Change
--init-directory
to a new directory (probably just a symlinkJoin) which would have the wrapped doom.The text was updated successfully, but these errors were encountered: