Hi Hissner,
I noticed you made new modeline instead of legacy doom-modeline. It seems better performance. Is it stable now? When will you drop doom-modeline?
And would you please introduce the new design and how to extract to a standalone package? If you've had a plan, it's fine. If NOT, I'd like update my package https://github.com/seagle0128/doom-modeline. But I need to know the details and differences for better understandings.
Thanks!
It is still experimental (it doesn't work well with indirect buffers, for instance), and it is Emacs 26+ only. I won't drop doom-modeline until Doom officially drops Emacs 25.x support (later this year or early 2019).
I'd recommend not updating to the new module _just_ yet. There's a chance I may rewrite it, if I find no way around its current limitations. I'll be sure to let you know once I consider it stable.
The new modeline makes use of variable watchers and many hooks to update segments independently of the modeline refresh rate, which makes it 100x faster, but I haven't ironed out the edge cases yet. It also makes it possible for other plugins to modify your mode-line-format, which can't be done with one big :eval form.
I'll let you know!
Thanks you!
Sorry if this isn't the right place for this question (still new here), but I noticed you used to use spaceline (which I used too) but got rid of it and I couldn't see why in the git logs. Was it due to performance? Is this new modeline able to provide something similar to spaceline ui if desired?
@seanfarley Did you mean Centuar Emacs? Actually spaceline is not removed. You can choose spaceline or doom-modeline according to the themes. doom-modeline is used for doom-themes, otherwise spaceline is used.
(setq centaur-theme 'doom) ; Color theme: default, doom, dark, light or daylight
Another trick is setting the themes by name except the symbols above. e.g. (setq centaur-theme 'doom-molokai).
Ah, no, sorry, I meant this repo (doom) and a series of commits from 2016: 3b04d2d4, 78ab53d1, 8fa1aaa7, etc.
@seanfarley Oh, so the question is for @hlissner 馃槃
in new modeline which-function-mode didn't show function name
@hlissner
I read your new codes. hooks are used a lot for better performance.
But I don't think these hooks for buffer id are enough for all scenarios (e.g. rename buffer, org babel src blocks buffer, edit state, change style, etc.). I tried this method but gave up due to many edge cases. So I still keep old design for buffer id.
Then I rewrote doom-modeline--buffer-file-name to improve performance. It's >5x faster now.
In original codes, `shrink-path-file-mixed' is used to truncate path, but it's REALLY slow. So I abandon it. Here is some data.
(benchmark-run 1000 (format-mode-line mode-line-format))
| Style | Time| New time|
| ------ | ------ | ------ |
|truncate-upto-project' | ~4s | ~0.7s|
|truncate-from-project' | NA | ~0.8s|
|truncate-with-project' | NA| ~0.65s|
|truncate-except-project' | NA | ~0.8s|
PS: I did some enhancements recently.
I continue improving doom-modeline recently. The performance is ~2x than last version (<0.5s), and add many new features, such as lsp indicator, minor modes, persp-name segment, and help-echo, etc.
Hi @seagle0128! It took me a while to find time to do it, but as of 8832737, Doom uses your doom-modeline, so I'll consider this issue resolved.
I'll move my modeline development efforts to your repo and send you occasional PRs. Thank you for writing doom-modeline!
Glad to know that!!! Thank you, @hlissner.
Most helpful comment
Hi @seagle0128! It took me a while to find time to do it, but as of 8832737, Doom uses your doom-modeline, so I'll consider this issue resolved.
I'll move my modeline development efforts to your repo and send you occasional PRs. Thank you for writing doom-modeline!