[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Proposing a new way for org-get-level-face to behave (cust
Re: [Orgmode] Proposing a new way for org-get-level-face to behave (customizable)
Fri, 12 Nov 2010 13:39:39 -0600
thanks you for this, I have checked in a slightly modified version of
On Nov 10, 2010, at 7:15 AM, Jonathan BISSON wrote:
I'm new to this list, and an 6-8 month (or so) user of org-mode.
I needed to get my outline-level-9 and further to look at least like
outline-level-8 and not cycling to outline-level-1 as my customization
for this one got a bigger face. And I don't want a child to be bigger
than its parent for visibility purpose.
So I'm proposing this (I could provide a patch but as I'm not using
very last version of orgmode neither the git one, I thought it was
useless to do so):
(defcustom org-cycle-level-faces t
"If non-nil, level styles cycle after level org-n-level-faces, so
level org-n-level-faces+1 is styled like level 1. If nil, then all
levels >=org-n-level-faces are styled like level org-n-level-faces"
(defun org-get-level-face (n)
"Get the right face for match N in font-lock matching of headlines."
(setq org-l (- (match-end 2) (match-beginning 1) 1))
(if org-odd-levels-only (setq org-l (1+ (/ org-l 2))))
(setq org-f (nth (% (1- org-l) org-n-level-faces) org-level-faces))
(setq org-f (nth (1- (if (< org-l org-n-level-faces) org-l
((eq n 1) (if org-hide-leading-stars 'org-hide org-f))
((eq n 2) org-f)
(t (if org-level-color-stars-only nil org-f))))
Hope it will be of some interest for some of you.
Thanks to quicksilver on irc.freenode.net #org-mode for the help.
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.