In this thread there was a solution for highlighting the whole
header line, so it stands out more from the buffer text:

http://thread.gmane.org/gmane.emacs.orgmode/15721/


This solution was a bit too heavy, because it affected all header
lines, and I didn't want all headers to be so conspicuous
everywhere, so I set a background color only for top-level
headers in my setup.

Here's an other solution which can be used to highlight headers
selectively if you want only particular headers to stand
out (bigger font, background color, etc.) without affecting other
headers on the same level.

To highlight a header with a custom color, simply put a space to
the end of the header line. (Headers with tags are not handled,
because I did not need it.)



(defface my-org-level-2
  '((t :background "darkseagreen1"))
  "")

(defface my-org-level-3
  '((t :background "moccasin"))
  "")


(setq my-org-level-emphasis-faces
      '((org-level-2 . my-org-level-2)
        (org-level-3 . my-org-level-3)
        ))


(defadvice org-get-level-face (after my-org-get-level-face activate)
  (if (and (eq (ad-get-arg 0) 3)
           (equal (aref (match-string 0)
                        (- (length (match-string 0)) 
                           (if org-fontify-whole-heading-line 2 1)))
                  ? ))
      (let ((new-face (assoc-default ad-return-value
                                     my-org-level-emphasis-faces)))
        (if new-face
            (setq ad-return-value new-face)))))





_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to