1

I'm toying around with font sizes in Emacs and I noticed that changing the font size to something huge, like, 160, creates a gap between the right end of the mode-line and the fringe:

screenshot of the issue

This is the code I ran on my scratch buffer:

(let ((faces '(mode-line
               mode-line-buffer-id
               mode-line-emphasis
               mode-line-highlight
               mode-line-inactive)))
  (set-face-attribute 'default nil :height (* 16 10))
  (mapc (lambda (face) (set-face-attribute face nil :height (* 9 10))) faces))

Yes, I'm trying to keep the mode-line font size I currently use (900)

  • The mode-line gets filled from left to right. So anything on the right is there because of a filler -- e.g., read-only column 22 line 13 filler filler filler filler stuff-on-right. If the filler is based on a particular font that becomes smaller, then there will be extra space on the right. You'll need to dig into the contents of the mode-line-format and see what else is there and modify it accordingly so that things are pushed to the right with additional filler. Or, like most of us, use the mode-line from left to right without any filler -- this is the default behavior. – lawlist Jun 29 '16 at 14:18
  • @lawlist: Please consider posting that as an answer. – Drew Jun 29 '16 at 14:46
1

The mode-line gets filled from left to right. Anything in the mode-line that is clearly skewed to the right is most likely occurring because a filler has been used -- e.g., read-only column 22 line 13 filler filler filler filler stuff-on-right.

If the filler is based on a particular font that becomes smaller, or if certain textual components of the mode-line become smaller due to a font change or font size reduction, then there may appear to be extra space on the right. The original poster should research the contents of the mode-line-format to see what else is present, and modify those aspects accordingly so that certain aspects appear to be better right-aligned (using additional filler).

Or, like many users, the original poster could try out the default behavior of the mode-line without using any filler.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.