While it's possible to do 'correct' left/right alignment adding an alternative method because fully evaluating the left and right just for alignment is a bit heavy,
when there is a simpler alternative.
If you know you only need a fixed amount of space on the right, you can fill in all but N characters,
this works as long as the right size is a fixed length.
%12s and similar can be used to ensure the string doesn't resize.
(defun mode-line-fill (reserve)
"Return empty space using FACE and leaving RESERVE space on the right."
(and window-system (eq 'right (get-scroll-bar-mode)))
(setq reserve (- reserve 3)))
(propertize " "
`((space :align-to (- (+ right right-fringe right-margin) ,reserve)))))
;; left align
"%e %b [%*]"
;; right align
"%6l, %4c, %8p")))
CMakeLists.txt [-] 1590, 0, 94%
Note that this only works well if you want to display a few items on the right hand side, as with this example - line/column/percentage. Showing all minor modes for eg wouldn't work well.