nix-doom-emacs icon indicating copy to clipboard operation
nix-doom-emacs copied to clipboard

Bump doom-emacs

Open thiagokokada opened this issue 3 years ago • 20 comments

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 avatar Oct 22 '22 12:10 thiagokokada

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 avatar Oct 22 '22 14:10 thiagokokada

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 avatar Oct 22 '22 15:10 thiagokokada

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 avatar Oct 22 '22 15:10 thiagokokada

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 avatar Oct 25 '22 18:10 thiagokokada

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 avatar Oct 25 '22 21:10 thiagokokada

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...

thiagokokada avatar Oct 25 '22 23:10 thiagokokada

I tried bumping the version and I get this now:

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

YellowOnion avatar Dec 06 '22 05:12 YellowOnion

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

thiagokokada avatar Feb 25 '23 11:02 thiagokokada

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

cab404 avatar Feb 25 '23 12:02 cab404

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.

thiagokokada avatar Feb 25 '23 12:02 thiagokokada

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

cab404 avatar Feb 25 '23 12:02 cab404

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.

thiagokokada avatar Feb 25 '23 12:02 thiagokokada

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 avatar Feb 25 '23 13:02 cab404

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!

cab404 avatar Feb 25 '23 13:02 cab404

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.

Lord-Valen avatar Feb 25 '23 18:02 Lord-Valen

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.

thiagokokada avatar Feb 26 '23 19:02 thiagokokada

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 avatar Mar 06 '23 14:03 avnik

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

avnik avatar Mar 06 '23 17:03 avnik

@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

avnik avatar May 22 '23 11:05 avnik

@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.

LoganBarnett avatar Mar 03 '24 06:03 LoganBarnett