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

Treemacs + Doom Modeline on emacs 29.1 #1047

Closed
gmemstr opened this issue Aug 10, 2023 · 12 comments · Fixed by #1049
Closed

Treemacs + Doom Modeline on emacs 29.1 #1047

gmemstr opened this issue Aug 10, 2023 · 12 comments · Fixed by #1049

Comments

@gmemstr
Copy link

gmemstr commented Aug 10, 2023

After updating past commit aa0944a, I encountered the same error describe here: #1046. Interestingly, despite a patch being pushed and confirming I am using the latest commit, I still encounter the error. Rolling back to before the doom modeline patches resolves the issue.

I am using https://github.com/hlissner/emacs-hide-mode-line, which is maybe the only "special" bit of my setup in regards to the modeline, with the relevant init.el config:

(use-package hide-mode-line :straight t)

(add-hook 'treemacs-mode-hook #'hide-mode-line-mode)
(use-package treemacs
  :straight t
  :init (with-eval-after-load 'winum
		  (define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
  :bind
  (:map global-map
		("M-0" . treemacs-select-window)
		("C-x t t" . treemacs)
		("C-x t C-t" . treemacs-find-file)))
(use-package treemacs-projectile
  :straight t
  :after (treemacs projectile))
(use-package treemacs-magit
  :straight t
  :after (treemacs magit)
  :ensure t)
(use-package treemacs-icons-dired
  :straight t
  :hook (dired-mode . treemacs-icons-dired-enable-once)
  :ensure t)

However removing the hook doesn't have any impact.

I do plan to dig into this more after work but wanted to file an issue so I don't forget.

@sebastiaanspeck
Copy link
Contributor

Do you have a workspace set? What is the result of (treemacs-workspace->name (treemacs-current-workspace))? If that returns nil, maybe test if this works for you:
(propertize (format " %s " (or (treemacs-workspace->name (treemacs-current-workspace)) ""))))

@gmemstr
Copy link
Author

gmemstr commented Aug 10, 2023

@sebastiaanspeck I do indeed have a workspace set

image

@gmemstr
Copy link
Author

gmemstr commented Aug 10, 2023

(To aide in replication if needed my entire init.el is here: https://git.gmem.ca/arch/dotfiles/src/branch/master/.emacs.d/init.el)

@sebastiaanspeck
Copy link
Contributor

Maybe a backtrace could help to investigate this further? Other people reported that Treemacs is fixed with the latest patch

@gmemstr
Copy link
Author

gmemstr commented Aug 10, 2023

Debugger entered--Lisp error: (void-variable treemacs)
  treemacs--setup-mode-line()
  #<subr treemacs-mode>()
  treemacs--mode-check-advice(#<subr treemacs-mode>)
  apply(treemacs--mode-check-advice #<subr treemacs-mode> nil)
  treemacs-mode()
  treemacs--init()
  treemacs(nil)
  funcall-interactively(treemacs nil)
  command-execute(treemacs)

I'm not sure if I can get more granular than that unfortunately, I'm not super experienced with debugging elisp.

@sebastiaanspeck
Copy link
Contributor

Treemacs

This is the issue... maybe need some help from the author of doom-modeline how to fix this?

@sebastiaanspeck
Copy link
Contributor

sebastiaanspeck commented Aug 10, 2023

image

This is a way without errors/warnings. Not sure if this is the nicest way..

@shakor0
Copy link

shakor0 commented Aug 11, 2023

Yeah my treemacs broke when adding:
(use-package doom-modeline :init (doom-modeline-mode 1) :custom ((doom-modeline-height 15)))

@Dawnblaze
Copy link

I had the same problem, but i run treemacs first, and then run doom-modeline, then this problem was solved.

@jtl5770
Copy link

jtl5770 commented Aug 12, 2023

I had the same problem, but i run treemacs first, and then run doom-modeline, then this problem was solved.

I actually have no idea how to do that with using use-package in my init.el. I tried switching the order of the respective calls around, but to no big surprise, it didn't change anything

@sebastiaanspeck
Copy link
Contributor

"Fix" is merged (reverted the breaking change). Please test the latest version

@sebastiaanspeck
Copy link
Contributor

IMG_1083

right now, the rhs shows invalid. That’s because the rhs is an empty list. This looks like the perfect place to show the current workspace name. Please take a look at #1049 to see if this works for you!

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 a pull request may close this issue.

5 participants