I want the entire line containing a heading in orgmode to be the background color of that heading. So for instance right now I have is what is shown in Heading 1 and 2, but what I want looks like Heading 3 (the black line at the Heading 3 is my cursor, so ignore that).

This seems simple, but after a lot of fiddling around with customize-face, I am still unsure how to do this.

Please let me know if you would like more details about my current setup, but I am interested in being able to do this in general.

Current setup

2 Answers 2


The information you provided is rather sparse. It seems like the "Heading 3" line is highlighted because your theme highlights the line the cursor is at?

Here are some pointers:

  • What is the value of the variable org-fontify-whole-heading-line? It should be set to t. Check its value with C-h v.
  • The faces of the org-headings should have a background configured. Customize them with M-x customize-appropos-faces and search for org-level. It should list 8 org-level faces that you can then customize.

UPDATE: When a heading is collapsed, it indeed doesn't fill in the full width of the line. The background is only filled in up to the three dots (known as the org-ellipsis). As far as I know, this is normal behaviour and can't be altered.

You'll notice that when a tag is added to a headline (which can be done with C-c C-c), collapsed headlines will be colored including the tag, which, depending on your settings, will be right aligned.

  • In what I have shown above, the Heading 3 is highlighted because I highlight the line with the cursor BUT what I want is to always have the whole line with first level headings be of a different color. I have tried both the methods you suggested here but it doesn't color the whole line when the headings are collapsed. Does that make sense? Commented Oct 5, 2018 at 19:59
  • As far as I know, this is standard behaviour. I've updated my answer.
    – EFLS
    Commented Oct 6, 2018 at 8:52
  • Wouldn't adjusting the style of ellipsis as well as the headline suffice?
    – user12563
    Commented Jan 6, 2019 at 12:36

A new answer, because I just came across this package that seems to do just what you are looking for: https://github.com/tarsius/backline

An outline heading does not extend to the right edge of the window when its body is collapsed. This is unfortuante when the used face sets the background color or another property that is visible on whitespace. This package adds overlays to extend the appearance of headings all the way to the right window edge.

Check out the documentation on github on how to use it.

  • Thanks! Will definitely check it out! Commented Nov 22, 2018 at 10:21
  • Note that the package adjusts how outline' shows, which is the mode on top of which org` is built. Haven't used it myself.
    – EFLS
    Commented Nov 22, 2018 at 11:26

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.