From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Proposing a new way for org-get-level-face to behave (customizable) Date: Fri, 12 Nov 2010 13:39:39 -0600 Message-ID: <515CC403-D2B7-4BB6-80F9-AC25DB1CADB7@gmail.com> References: <1289394955.2389.1.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=57465 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGzTb-0002BZ-17 for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 14:40:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGzTZ-00041L-PQ for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 14:39:58 -0500 Received: from mail-gw0-f41.google.com ([74.125.83.41]:39301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGzTZ-00041F-Le for emacs-orgmode@gnu.org; Fri, 12 Nov 2010 14:39:57 -0500 Received: by gwj16 with SMTP id 16so1999869gwj.0 for ; Fri, 12 Nov 2010 11:39:57 -0800 (PST) In-Reply-To: <1289394955.2389.1.camel@localhost.localdomain> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jonathan BISSON Cc: emacs-orgmode@gnu.org Ji Jonathan, thanks you for this, I have checked in a slightly modified version of your patch. Thanks - Carsten On Nov 10, 2010, at 7:15 AM, Jonathan BISSON wrote: > Hi, > > 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 > the > 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 > the > 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" > :group 'org-appearance > :type 'boolean) > > (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)))) > (if org-cycle-level-faces > (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 > org-n-level-faces)) org-level-faces)) > ) > (cond > ((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. > > > Cheers. > > > > _______________________________________________ > 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