At the bottom of the screen when emacs is open there is a strip of purple, meaning that emacs in terminal isnt maximizing to the full size that the terminal window allows and thus the background from the terminal is showing. I know this is nit-picky but my OCD is driving me crazy. Anyway to fix this?

I would post an image but I don't have enough stack karma points yet.

  • 1
    Comment a link to an image and I'll edit it in
    – nanny
    Jul 10, 2015 at 19:41
  • Related - Same question on SO Jul 10, 2015 at 20:11
  • Yeah, someone on SO yelled at me for posting this question there and I didn't know how to delete it. He was voting for removal?
    – ADF
    Jul 10, 2015 at 21:34
  • @ADF I am not suggesting that this question should be closed as duplicate (and it also cannot be closed as duplicate as this is emacs.stackexchange and that is from stackoverflow); I simply put that link for extra reference. You are welcome to post such questions to emacs.SE :) Jul 11, 2015 at 2:06

1 Answer 1


The Emacs manual says you can set the option frame-resize-pixelwise to non-nil to allow frame sizes by pixel. Normally the frame dimensions (not counting the menu bar, tool bar, etc) are integer multiples of frame-char-height in height and frame-char-width in width. The manual notes that you need to set this variable to non-nil in your init file so that it interacts properly with you window manager.

In your init.el or .emacs file, add this:

(setq frame-resize-pixelwise t)

to enable pixel resizing rather than char height/width resizing.

User Option: frame-resize-pixelwise

If this option is nil, a frame’s size is usually rounded to a multiple of the current values of that frame’s frame-char-height and frame-char-width. If this is non-nil, no rounding occurs, hence frame sizes can increase/decrease by one pixel.

Setting this causes the next resize operation to pass the corresponding size hints to the window manager. This means that this variable should be set only in a user’s initial file; applications should never bind it temporarily.

The precise meaning of a value of nil for this option depends on the toolkit used. Dragging the frame border with the mouse is usually done character-wise. Calling set-frame-size (see below) with arguments that do not specify the frame size as an integer multiple of its character size, however, may: be ignored, cause a rounding (GTK+), or be accepted (Lucid, Motif, MS-Windows).

With some window managers you may have to set this to non-nil in order to make a frame appear truly “maximized” or “fullscreen”.

  • This might not fully address the issue that OP is experiencing, but it helped me solve a problem that had been bothering me for a long time: having to tweak obscure settings in my window manager to make sure Emacs frames would properly maximize in KDE! So: Thank you and +1! :)
    – itsjeyd
    Jul 24, 2015 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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