I'd like to add a margin to the top of the window so that it's not so close to the top part of the frame.

Here's what it looks like currently (arrow indicates where I'd like to add extra margin): enter image description here

How would I go about accomplishing this?


According to the docs, it can't be set individually at the moment. You can play with internal-border-width which would change all the borders inside the frame. That's what setting it to 7 gives:

(add-to-list 'default-frame-alist '(internal-border-width . 7))

X buffer, internal-border-width set to 7

Maybe you'll find a value which would add enough space on top and at the same time small enough that it doesn't affect the sides too much.

  • It would be a decent workaround but because I'm using tabbar it creates the space above the tabs not in between the tabs and text I'm guessing it would be hard to add a margin in that specific place. Unless I figure out how to add extra line height only to the top line of text.
    – Rtsne42
    Sep 20 '16 at 19:55

The tabbar package uses an obscure emacs features called the header-line to display the tab bar. This header-line is an extra line of text shown at the top of a buffer, just as the mode-line is shown at the bottom. The text in this line is rendered using the tabbar-default face, so you could edit it and change some parameters to customize the look of the tab bar. You could change its font size, or change the font used, for example. Perhaps that will get you close to what you want.

On the other hand, you can't change the line spacing for an individual face, that has to be done for the buffer as a whole. (Curiously, the line-spacing variable isn't used for the header-line or the mode-line, so you can put extra space between all the lines of the buffer except these two.)

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.