From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay McCarthy Subject: Faces interaction between org-mode and emacs24 Date: Sat, 18 Aug 2012 11:24:58 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2mlj-0003PO-Cm for emacs-orgmode@gnu.org; Sat, 18 Aug 2012 13:25:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2mlf-0004BA-NP for emacs-orgmode@gnu.org; Sat, 18 Aug 2012 13:25:03 -0400 Received: from mail-vb0-f41.google.com ([209.85.212.41]:36727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2mlf-0004Aq-J0 for emacs-orgmode@gnu.org; Sat, 18 Aug 2012 13:24:59 -0400 Received: by vbkv13 with SMTP id v13so4955010vbk.0 for ; Sat, 18 Aug 2012 10:24:58 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I recently upgraded from emacs23 to emacs24, using the current git version of org-mode with both (current = e4c4d85). I am now experiencing something odd. If I open up the org-agenda to see my TODOs, the node titles are colored one way (red for late, gray for future, etc). I have this color setup using the org-agenda-before-sorting-filter-function variable, it basically looks at the deadline time and then calls put-text-property to give the text a new 'face property. You can see the code here: https://github.com/jeapostrophe/exp/blob/master/.emacs.el#L627 (it goes to about line 736) This worked great in emacs23. But now with emacs24, the colors are only correct when I first start emacs and load the agenda the first time. If I ever go to visit a TODO item in the org buffer (for example, by pressing ) then the color of the item from the org buffer appears in the agenda. For example, if something is one level deep (*) then it becomes blue-ish, even though my filtering function has change the face to be red. If I put my cursor in the org-buffer on the item and describe its text-properties, then I get the face to be, for example 'org-level-6, but if I go to the org-agenda and put my cursor on the text, I see that the face is 'due (what it is supposed to be) Even stranger, if I am in the org-agenda and turn OFF column mode (org-columns), then I see the "correct" colors of all the items. It is just in column mode that I see the colors from the org buffer. I was able to fix this with the following patch: diff --git a/lisp/org-colview.el b/lisp/org-colview.el index ff75af6..bee908b 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -150,6 +150,8 @@ This is the compiled version of the format.") "Create a new column overlay and add it to the list." (let ((ov (make-overlay beg end))) (overlay-put ov 'face (or face 'secondary-selection)) + (remove-text-properties + 0 (length string) '(face nil) string) (org-overlay-display ov string face) (push ov org-columns-overlays) ov)) Basically, it removes whatever face was on the string that the column is made out of before it creates the overlay, otherwise the face for the column doesn't get applied. I have no idea if this is a good solution overall, but I got it work... and maybe others will have a similar problem. Jay -- Jay McCarthy Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93