doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.37k stars 3.05k forks source link

Tabs does not work with daemon #6647

Closed hvsouza closed 3 months ago

hvsouza commented 2 years ago

What did you expect to happen?

Centaur tabs will not work when using emacs as client. Here is the Vanilla version only enabling "tabs". It works normally when loading emacs without daemon.

image

What actually happened?

When opening emacs with "emacsclient -c" the tabs are not displayed

image

Describe your attempts to resolve the issue

No response

Steps to reproduce

  1. Open emacs normally
  2. Enable "tabs" in the init.el
  3. Execute "doom sync"
  4. Start daemon with "emacs --daemon"
  5. Open the client "emacsclient -c"
  6. Open any two files in the same folder.

System Information

https://pastebin.com/KekgNm5X

abougouffa commented 2 years ago

I confirm this, I think it never worked on my machine (with Emacs daemon).

shisui98 commented 2 years ago

I had this problem too. In ~/.emacs.d/modules/ui/tabs/config.el there's a line centaur-tabs-set-bar 'left, I just changed it to centaur-tabs-set-bar 'right and that seems to have fixed the issue. Why did I change that line? Because of this comment here: https://github.com/ema2159/centaur-tabs/issues/127#issuecomment-894603644

edit: After this fix, even if centaur-tabs is enabled by default, tabs doesn't show up. M-x Centaur-tabs-mode disables it, and after I repeat this to re-enable it, only then do the tabs show up. A slight hiccup I guess?

abougouffa commented 2 years ago

Thank you @shisui98.

I confirm, setting centaur-tabs-set-bar to 'right fixes the problem!

I added this snippet to my config.el until the problem get fixed:

(after! centaur-tabs
  (setq centaur-tabs-set-bar 'right))
hvsouza commented 2 years ago

That worked for me too. Thanks @shisui98 and @abougouffa !

syu-id commented 2 years ago

Setting centaur-tabs-set-bar to 'right didn't work for me. But this one does: https://github.com/ema2159/centaur-tabs/issues/127#issuecomment-1126913492. It turns centaur-tabs-mode off and on when a new frame is created.

ronisbr commented 1 year ago

The solution proposed by @abougouffa fix the problem here when using GUI, and the solution mentioned by @rongmu fix the problem here when using TUI :D

miguno commented 1 year ago

None of the workarounds listed here worked for me.

Environment: macOS 13.5.2, Emacs 29.1 running in wezterm as terminal

abgruszecki commented 11 months ago

None of the workarounds work for me either, centaur-tabs work only if I start Emacs with emacs.

I'm on Ubuntu 22.04, Emacs 29.1, GUI.

This might be an issue with centaur-tabs itself, though : https://github.com/ema2159/centaur-tabs/issues/127

hlissner commented 3 months ago

As of https://github.com/doomemacs/doomemacs/commit/fddc912f81ce546fc3d105c99a6748b1e00ce23a, this issue should be resolved. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!

jrgant commented 3 months ago

After upgrading doom so that the fix in fddc912 is present, I am still having this problem with emacsclient (but not emacs). The only centaur-related configuration I have in config.el is as follows:

(use-package! centaur-tabs
  :hook
  ;; turn centaur-tabs-mode off for select modes
  (mu4e-view-mode . (lambda() (centaur-tabs-mode -1)))
  (inferior-ess-r-mode . (lambda() (centaur-tabs-mode -1)))
  (inferior-python-mode . (lambda() (centaur-tabs-mode -1)))
  (+doom-dashboard-mode . (lambda() (centaur-tabs-mode -1)))
  (elfeed-search-mode . (lambda() (centaur-tabs-mode -1)))
  :config
  (custom-set-faces!
   '(centaur-tabs-default :family "Inter" :height 125)
   '(centaur-tabs-selected :inherit centaur-tabs-default)
   '(centaur-tabs-selected-modified :inherit centaur-tabs-selected)
   '(centaur-tabs-unselected :inherit centaur-tabs-default)
   '(centaur-tabs-unselected-modified :inherit centaur-tabs-unselected)
   '(centaur-tabs-active-bar-face :inherit centaur-tabs-default)))

Things I've tried post-update (though, looking at the fix, I think the second two shouldn't be necessary):

Kubuntu 22.04.4, emacs 29.3

Happy to provide additional info if helpful. Thanks!