From mboxrd@z Thu Jan 1 00:00:00 1970 From: Renato Ferreira Subject: Re: Bug: Priority #B in Agenda causes invalid face reference [8.2.1 (8.2.1-15-ge5cecc-elpa @ /Users/Paul/.emacs.d/elpa/org-20131021/)] Date: Wed, 29 Apr 2015 08:52:41 -0300 Message-ID: <87fv7jf8xi.fsf@gmail.com> References: <87fv7qv8uu.fsf@gmail.com> <87bni8kqhf.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnQWY-0002KF-Ol for emacs-orgmode@gnu.org; Wed, 29 Apr 2015 07:51:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnQWT-0007nr-QF for emacs-orgmode@gnu.org; Wed, 29 Apr 2015 07:51:30 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:35944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnQWT-0007nj-L0 for emacs-orgmode@gnu.org; Wed, 29 Apr 2015 07:51:25 -0400 Received: by qku63 with SMTP id 63so12846649qku.3 for ; Wed, 29 Apr 2015 04:51:24 -0700 (PDT) In-Reply-To: <87bni8kqhf.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 28 Apr 2015 21:22:20 +0200") 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Hello, Yes you are right, i digged deeper in the problem and it seems to be that the cond: (cond ((org-face-from-face-or-color 'priority nil (cdr (assoc p org-priority-faces)))) ((and (listp org-agenda-fontify-priorities) (org-face-from-face-or-color 'priority nil (cdr (assoc p org-agenda-fontify-priorities))))) ((equal p l) 'italic) ((equal p h) 'bold)) returns nil altogether for priorities which are neither the highest (equal p h) or the lowest (equal p l) (hence the bug appearing on #B priorities by default). That gives (nil . org-priority) so: (overlay-put ov 'face (nil . 'org-priority)) Which triggers the message the second time it runs. >From the elisp manual for (overlay-put ... 'face (a-cons . cell)): =E2=80=A2 A cons cell of the form =E2=80=98(foreground-color . COLOR-NAME)= =E2=80=99 or =E2=80=98(background-color . COLOR-NAME)=E2=80=99. This specifies the foreground or background color, similar to =E2=80=98(:foreground COLOR-NAME)=E2=80=99 or =E2=80=98(:background COLOR-NAME)=E2=80=99. This f= orm is osupported for backward compatibility only, and should be avoided. Which makes me think the whole cond inside it: (overlay-put ov 'face (cons (cond ...))) is kinda wrong from the start. But i don't know, just guessing because overlay-put is a C function. Anyways, for the ECM: (setq org-priority-faces nil) (setq org-agenda-fontify-priorities 'cookies) (setq org-highest-priority ?A) (setq org-lowest-priority ?C) Create an .org with: * TODO [#B] Test Start the agenda for TODO items with buffer restriction on that file. When it loads and everytime you pass the cursor on the line with the TODO item it gives the message: "Invalid face reference: nil" I hope that helps, thanks already for looking into it! Renato Ferreira