emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Renato Ferreira <renatofdds@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87fv7jf8xi.fsf@gmail.com> (raw)
In-Reply-To: <87bni8kqhf.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 28 Apr 2015 21:22:20 +0200")

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)):

• A cons cell of the form ‘(foreground-color . COLOR-NAME)’ or
‘(background-color . COLOR-NAME)’.  This specifies the
foreground or background color, similar to ‘(:foreground
COLOR-NAME)’ or ‘(:background COLOR-NAME)’.  This form 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

  reply	other threads:[~2015-04-29 11:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 21:21 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/)] Renato
2015-04-28 19:22 ` Nicolas Goaziou
2015-04-29 11:52   ` Renato Ferreira [this message]
2015-04-29 21:36     ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2013-10-27  8:30 Paul Rankin
2013-10-28 14:38 ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv7jf8xi.fsf@gmail.com \
    --to=renatofdds@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).