Skip to content
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

Bump doom-emacs #316

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

thiagokokada
Copy link

@thiagokokada thiagokokada commented Oct 22, 2022

This PR is trying to bump doom-emacs to a newer commit, after the failure of PR #268 (and any subsequent PR trying to bump doom-emacs input).

@thiagokokada
Copy link
Author

So it builds and runs, but something strange is happening:
2022-10-22_15-57-11-screenshot

Not sure where this @ from ~/.local/share/doom/@/init.29.elc is coming from.

@thiagokokada
Copy link
Author

So it builds and runs, but something strange is happening: 2022-10-22_15-57-11-screenshot

Not sure where this @ from ~/.local/share/doom/@/init.29.elc is coming from.

I see, this @ is coming from the new doom profile feature. Still this looks wrong, we shouldn't be loading the compiled files from ~/.local. Probably something is wrong with my patches.

@thiagokokada
Copy link
Author

Well, now it is working. However anything that tries to write in the doom-data-dir is failing right now since this is still pointing to the /nix/store. If I change it to a PATH outside of the /nix/store it breaks everything.

@thiagokokada
Copy link
Author

With commit 4386c5c it should be working with emacsGit. Stable emacs for some reason still doesn't work, and I have no idea why...

@thiagokokada
Copy link
Author

For some reason SPC SPC is not working for me with commit 4394f94. However I am not sure if the fault is this PR or just the bump in doom-emacs and something got broken upstream.

@thiagokokada thiagokokada force-pushed the bump-doom-emacs branch 2 times, most recently from 6cc0734 to 5b6ffca Compare October 25, 2022 22:50
@thiagokokada
Copy link
Author

For some reason SPC SPC is not working for me with commit 4394f94. However I am not sure if the fault is this PR or just the bump in doom-emacs and something got broken upstream.

So other doom-emacs core functions like SPC h k are not working. This and the fact that the config is not working in vanilla Emacs seems to indicate that I messed up somewhere...

@YellowOnion
Copy link

I tried bumping the version and I get this now:

 evaluation aborted with the following error message: 'Package not available: font-lock-ext'

@thiagokokada
Copy link
Author

Rebased this branch with master with some adjustments. Still only works for Emacs 29+.

@thiagokokada thiagokokada force-pushed the bump-doom-emacs branch 4 times, most recently from 44f5b30 to 3ff9b44 Compare February 25, 2023 12:01
@cab404
Copy link

cab404 commented Feb 25, 2023

wow, thank you for keeping working on this!
you need any help?

Flake lock file updates:

• Updated input 'doom-emacs':
    'github:doomemacs/doomemacs/3853dff5e11655e858d0bfae64b70cb12ef685ac' (2022-09-06)
  → 'github:doomemacs/doomemacs/f5f9c7222ab266f36ee1273b386a35a880f8f299' (2023-02-24)
• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/c16be6de78ea878aedd0292aa5d4a1ee0a5da501' (2023-02-14)
  → 'github:nix-community/emacs-overlay/3f5e4c795311a0eaec5f7441f7a95ed22481354b' (2023-02-25)
• Updated input 'format-all':
    'github:lassik/emacs-format-all-the-code/47d862d40a088ca089c92cd393c6dca4628f87d3' (2020-02-14)
  → 'github:lassik/emacs-format-all-the-code/c6f33e6efb55b5e5112d3d1366fea910d3629de2' (2023-02-23)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f5dad40450d272a1ea2413f4a67ac08760649e89' (2023-02-22)
  → 'github:NixOS/nixpkgs/806075be2bdde71895359ed18cb530c4d323e6f6' (2023-02-24)
@thiagokokada thiagokokada force-pushed the bump-doom-emacs branch 3 times, most recently from 5d15b27 to 1223be7 Compare February 25, 2023 12:24
@thiagokokada
Copy link
Author

thiagokokada commented Feb 25, 2023

wow, thank you for keeping working on this! you need any help?

Yeah:

  • Need to figure out why some things are not working (SPC SPC is undefined for example, so it seems that core doomemacs is not loaded)
  • It seems things from my config.el itself are not being loaded too
  • Make it work in Emacs 28

BTW, I think all those issues are related. My impression is that for some reason the Emacs is not loading the default.el file, only early-init.el. This is why Emacs 29+ somewhat works but it is broken, while Emacs 28 does not work at all.

@cab404
Copy link

cab404 commented Feb 25, 2023

Hm, looks like SPC p p is now Ctrl-c p p, maybe some things got remapped?
Will dig in the doom-emacs log a bit

@thiagokokada
Copy link
Author

Hm, looks like SPC p p is now Ctrl-c p p, maybe some things got remapped? Will dig in the doom-emacs log a bit

I don't think it got remapped. I think the module itself is loaded, but the doomemacs customizations are not. This is why it is using the default mappings instead of the ones from doomemacs.

@cab404
Copy link

cab404 commented Feb 25, 2023

Hm, trying to load doom-start.el manually drops the following:

if: Error in Doom Emacs core: "Doom is in an incomplete state", "run 'doom sync' on the command line to repair it"

@cab404
Copy link

cab404 commented Feb 25, 2023

Aaand, doom doctor whines as well:


> Checking your Emacs version...
  ! Detected a development version of Emacs (30.0.50)
    This is the bleeding edge of Emacs. Doom does not support it because
    Emacs HEAD is in an especially unstable period of its development. If
    you've found a stable commit, great! But be cautious about updating
    too eagerly!

    Because development builds are prone to random breakage, there will be
    a greater burden on you to investigate and deal with issues. Please
    make extra sure that your issue is reproducible in 28.1 before
    reporting them to Doom's issue tracker!

    If this doesn't phase you, read the "Why does Doom not support Emacs
    HEAD" QnA in Doom's FAQ. It offers some advice for debugging and
    surviving issues on the bleeding edge. Failing that, 28.1 is highly
    recommended and will always be Doom's best supported version of Emacs.
> Checking for Doom's prerequisites...
> Checking for Emacs config conflicts...
> Checking for great Emacs features...
> Checking for private config conflicts...
> Checking for stale elc files...
> Checking for problematic git global settings...
> Checking Doom Emacs...
! Attempt to load DOOM failed
    (Profile init file hasn’t been generated. Did you forgot to run ’doom sync’?)


There are 2 warnings!

@Lord-Valen
Copy link

https://github.com/doomemacs/doomemacs/blob/master/modules/config/default/config.el#L495-L497
What's probably happening is that :config default is being loaded before :editor evil so +emacs-bindings is loaded instead of +evil-bindings. That explains why SPC p p becomes C-c p p, as the change is from the leader for +evil-bindings to the leader for +emacs-bindings. I'm pretty sure the projectile bindings are otherwise similar.

@thiagokokada
Copy link
Author

https://github.com/doomemacs/doomemacs/blob/master/modules/config/default/config.el#L495-L497 What's probably happening is that :config default is being loaded before :editor evil so +emacs-bindings is loaded instead of +evil-bindings. That explains why SPC p p becomes C-c p p, as the change is from the leader for +evil-bindings to the leader for +emacs-bindings. I'm pretty sure the projectile bindings are otherwise similar.

Interesting. Do you have any idea why? Because we are basically doing the same initialization code than doomemacs.

@avnik
Copy link

avnik commented Mar 6, 2023

Tried your branch. doom run works, but just emacs spawn plain emacs.
Also I see a lot of process like /nix/store/l0np48ywa601ravm8k57h97vlm12spyj-emacs-28.2/bin/emacs --batch -l /tmp/emacs-async-comp-magit-process-0GzhgT.el right after doom run. Does something going wrong? (if I read correctly, emacs 29 should be used)

PS well, by default is 28.2, I trying atm with your snippet and same version of emacs-overlay
Update -- with emacsGit it works

@avnik
Copy link

avnik commented Mar 6, 2023

Well, after some testing... SPC-b-... menu is missing, some other stuff missed as well

@avnik
Copy link

avnik commented May 22, 2023

@thiagokokada I fix load of evil with follow patch:

diff --git a/modules/config/default/+evil.el b/modules/config/default/+evil.el
index a5ddc3099..35c294a76 100644
--- a/modules/config/default/+evil.el
+++ b/modules/config/default/+evil.el
@@ -1,4 +1,5 @@
 ;;; config/default/+evil.el -*- lexical-binding: t; -*-
+(require 'evil)
 
 (defun +default-disable-delete-selection-mode-h ()
   (delete-selection-mode -1))
diff --git a/modules/config/default/config.el b/modules/config/default/config.el
index f4a301488..0dd5e438d 100644
--- a/modules/config/default/config.el
+++ b/modules/config/default/config.el
@@ -492,6 +492,6 @@ Continues comments if executed from a commented line. Consults
 ;;
 ;;; Bootstrap configs
 
-(if (featurep 'evil)
+(if (modulep! :editor evil)
     (load! "+evil")
   (load! "+emacs"))

But that fix symptoms, not a real problem

@LoganBarnett
Copy link

@thiagokokada Thanks for you work on this! The problems that I'm running into here are very similar to the ones you report here (SPC only works as a prefix because my config has some general.el keybindings in it). Some fundamental part of Doom doesn't seem to have gotten loaded, or perhaps it got loaded too late or early. I'm also in full eye-daggers-black-on-white-theme on startup :|

But... the weird thing for me is: I'm not even using nix-doom-emacs (yet!). I got this while migrating to nix-darwin from home-manager. It makes me wonder if some other elements are at play here. Have you had a working Doom Emacs with your changes reverted?

I might try getting on nix-doom-emacs just so I'm in sync with this effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants