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

[Bug] Resizing window with doom-dashboard increasingly cuts off right side of modeline #668

Closed
2 of 3 tasks
Jdogzz opened this issue Sep 25, 2023 · 13 comments
Closed
2 of 3 tasks
Labels
good first issue Good for newcomers

Comments

@Jdogzz
Copy link

Jdogzz commented Sep 25, 2023

Thank you for the bug report

  • I am using the latest version of doom-modeline related packages.
  • I checked FAQ.
  • You may also try reproduce the issue using clean environment and minimal configurations with
    the command emacs -Q.

Bug description

Right side of modeline on doom-dashboard screen becomes increasingly cut off when window is resized larger than default (so I'm not sure if this falls under FAQ #7). Other screens don't seem to cause problems with the modeline when the window is being resized.

Steps to reproduce

  1. Open emacs
  2. Resize window larger and larger

Expected behavior

Right side of modeline will adjust to stay visible.

OS

Linux

Emacs Version

28 (gccemacs)

Emacs Configurations

Doom Emacs

Error callstack

N/A

Anything else

Screencast:
Screencast from 2023-09-25 05-40-05.webm

doom info output of my minimal test system (I'm experiencing the same problem on my primary system with nixos):
https://pastebin.com/3NpYrRfA

(I unchecked the last checkbox after the fact since it's technically minimal in terms of doom emacs config, just unpinning the modeline to make sure the latest commit is used, but I didn't try emacs -Q minimal)

@Jdogzz Jdogzz added the bug Something isn't working label Sep 25, 2023
@seagle0128
Copy link
Owner

Can you reproduce this issue with emacs -Q?
BTW: I strongly to recommend emacs 29.

@Jdogzz
Copy link
Author

Jdogzz commented Sep 26, 2023

I have upgraded to emacs 29 on my primary and test systems but do still see the problem on my primary and test systems. The test system experiences the problem with out-of-the-box doom emacs installed on emacs 29.

I have investigated using emacs -Q but it doesn't seem like that will be practical to do as doom-dashboard appears to be intimately linked with doom emacs (i.e. there's not a package for the dashboard like there is for doom-modeline). I am happy to follow pointers to making the dashboard work starting from emacs -Q if anyone has them.

@seagle0128
Copy link
Owner

In any buffer, eval (doom-modeline-set-modeline 'dashboard) to set dashboard mode-line.

@Jdogzz
Copy link
Author

Jdogzz commented Sep 27, 2023

Got it, thank you. I used that with the test system with emacs -Q and could not reproduce the issue I showed in the original video.

Screencast.from.2023-09-27.05-52-37.webm

@seagle0128
Copy link
Owner

seagle0128 commented Sep 27, 2023

So you may need help from doom-emacs community? I guess the latest version of doom-modeline is not applied.

@Jdogzz
Copy link
Author

Jdogzz commented Sep 27, 2023

Sure thing, I can file a bug report there.

@keevee09
Copy link

keevee09 commented Dec 26, 2023

I am having this issue with doom-emacs on both Windows 11 WSL2 Ubuntu 22.04 and Fedora 39.
What I found is that it happens with the primary modeline, but, if I create a new window (split horizontally with <SPC>-w-n), then the secondary modeline adjusts correctly as I change the size of the window frame, for both the cli and the gui versions of doom-emacs. The original doom-modeline still refuses to adjust, whether that frame is active or inactive.
When I split vertically, I notice that the right side adjusts to the DOOM v3.0.0-pre text for both the original and the second doom-modeline. The clock etc. should be displayed after this text but it appears that the "DOOM" text is anchoring to the right, and so any subsequent entries on the modeline are cut off.

@seagle0128
Copy link
Owner

@keevee09 Are you able to reproduce the issue with emacs -Q and the latest doom-modeline? If NOT, please file an issue for doom-emacs.

@keevee09
Copy link

@seagle0128 I will attempt to reproduce the issue with emacs -Q and the latest doom-modeline. So far, what I have seen, I suspect it is a doom-emacs issue but I am not certain.
The text: "DOOM v3.0.0-pre" is created in $HOME/.config/emacs/modules/ui/doom-dashboard/config.el:176:
175 (define-derived-mode +doom-dashboard-mode special-mode
176 (format "DOOM v%s" doom-version)
177 ...
The constant doom-version is created in:
$HOME/.config/emacs/lisp/doom.el:167:
167 (defconst doom-version "3.0.0-pre"
168 ...
"DOOM v3.0.0-pre" is the text that anchors itself to the right, before any other entries and seems to cause the problem.
Please give me a day or two to follow up.

@seagle0128
Copy link
Owner

@keevee09 Which version of doom-modeline are you using?

@keevee09
Copy link

keevee09 commented Dec 27, 2023

I am using version 20231222.636 of doom-modeline.
git log shows commit: 93f240f7a0bf35511cfc0a8dd75786744b4bcf77 from Mon Sep 18 19:44:25 2023 +0800, with comment Improve macro segment.

As you suggested, it appears to be a doom-emacs issue, not a doom-modeline one.

I noticed just now that when opening the readme files from within $HOME/.config/emacs in doom-emacs, that the text DOOM 3.0.0-pre is not displayed, and that the issue disappears. With Doom Docs or GFM displayed, rather than DOOM 3.0.0-pre, I can adjust the size of the doom-emacs window and the right side of the modeline adjusts to display as expected. So it is only an issue when emacs is displaying the DOOM splashscreen... which is not really an issue :)

Screenshot from 2023-12-27 07-11-22

Screenshot from 2023-12-27 07-37-56

@seagle0128
Copy link
Owner

It looks good! So can I close this issue now?

@keevee09
Copy link

keevee09 commented Dec 28, 2023 via email

@seagle0128 seagle0128 added good first issue Good for newcomers and removed bug Something isn't working labels Dec 28, 2023
hlissner added a commit to doomemacs/doomemacs that referenced this issue Jan 9, 2025
This is due to :align-to factoring in the margins into its alignment,
which is ever changing in the dashboard buffer (or anywhere
visual-fill-column is active).

Even though `mode-line-right-align-edge` was introduced in Emacs 30,
doom-modeline backports so, so its users should benefit from this as
well.

Close: #8114
Fix: #7466
Fix: seagle0128/doom-modeline#668
Fix: seagle0128/doom-modeline#672
Co-authored-by: unipro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants