line-spacing adds space at the bottom. Here is what I mean - Image link. The docs say that the space is added below lines of graphic displays. I want the space to be added at the top. How do I do that?

  • Note that you can include images directly in your questions/answers. This is preferable because the image will be hosted on SE, rather than some external website which could be taken down.
    – Basil
    Jan 14 '18 at 11:43

I believe you are looking for the line-height text property, as described in (elisp) Line Height, which see. This manual node describes the interactions between the properties line-height and line-spacing and lists their accepted value formats.

For example, given the following buffer contents (with line numbers on the left and * representing point)

1 foo
2 *bar
3 baz


(put-text-property (line-end-position)
                   (line-beginning-position 2)
                   'line-height 2.0)

results in

1 foo

2 *bar
3 baz

Unfortunately, the line-height text property, unlike line-spacing, does not come with an associated frame parameter or buffer-local variable, so there is no avoiding playing around with text properties programmatically.


This would be an awful hack, but could work in case there is no other solution:

  1. Set the minibuffer line spacing to 0
  2. Have an empty default header line.
  3. Set the header line to only be a very few characters in height.

This way, there will be no empty space under emacs, and a thin space above emacs.

  • You can merge both of your answers in to one
    – Prasanna
    Sep 21 '16 at 8:50

If you do not mind changing or tweaking your font, there may be some way to add space above the characters in the font glyphs or in the font properties (something like baseline, maybe?).

I think FontForge can do this.

  • Both the solutions seem hacks instead of customizations. Let's wait for more answers. If not, I'll try one of these. Thank you. Feb 23 '16 at 16:03
  • Yes, hack they are, not solutions indeed! Feb 25 '16 at 0:10

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.