reddit / emacs

Best way to edit mode-line?

Magicaldave918 · 2022-10-13 21:37
Hey all, I recently posted about getting vuiet set up in my emacs. After getting it working completely, I have an issue that I think is specific to Spacemacs... Vuiet is supposed to show playing track information on the modeline - right about where you’d normally have line/char line counts. Mine very rarely does this; I haven’t exactly pinned it down, but SOME buffers will actually show this information. It doesn’t seem to be vuiet-specific ones exactly, but I think that might be it. I’d really appreciate any suggestions for where I could look to pull that info out of vuiet and add it to my modeline. I tried placing (vuiet-update-mode-line) in the modeline config variable (forget the exact name) but that didn’t help. Sometimes when I run the command manually I can actually see it for what looks like a frame or two.
Danrobi1 · 2022-10-14 05:45
Have a look at my [modeline config](https://codeberg.org/danrobi/dotfiles/src/branch/main/emacs/mode-line-text-align-right#L42). You didnt show us any code tho. Did you tried with `:eval`?
Magicaldave918 · 2022-10-14 10:04
Well... no - it’s meant to be ran interactively. I get nothing at all if I attempt to run the function from `M-:` But I’ll take a look at your config, that’ll be an excellent place to start!
arthurno1 · 2022-10-15 06:42
Probably the best thing would be to [take a look at how modeline works, modeling format etc](https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Format.html).