Open ghost opened 6 years ago
The resulting function isn't called my-modeline. It has a prefix. See the docstring for spaceline-compile. I'm on a phone now so it's difficult for me to check. It's something like spaceline-ml-my-modeline.
Ah, right you are, thanks.
I made a summary demo, posting in case you think it'd be helpful for the readme. Cheers!
;; Custom spaceline example
(spaceline-define-segment my-segment-left-1 "My first left segment." "Hello, World (LEFT 1)!")
(spaceline-define-segment my-segment-left-2 "My second left segment." "Hello, World (LEFT 2)!")
(spaceline-define-segment my-segment-right-1 "My first right segment." "Hello, World (RIGHT 1)!")
(spaceline-define-segment my-segment-right-2 "My second right segment." "Hello, World (RIGHT 2)!")
(spaceline-compile "my-modeline" '(my-segment-left-1 my-segment-left-2) '(my-segment-right-1 my-segment-right-2))
(setq mode-line-format '("%e" (:eval (spaceline-ml-my-modeline))))
I'm trying to define some new segments. I tried to follow the docs:
Executing this empties my mode-line, but doesn't add "Hello, World (left)!" and "Hello, World (right)!" like I was expecting. I'm sure I'm doing something wrong -- could you point me in the right direction? Thanks.