Re: [O] 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/)]

2015-04-29 Thread Nicolas Goaziou
Renato Ferreira  writes:

> 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.

Indeed.

> 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.

Actually, the function uses the second point:

  • A list of faces.  Each list element should be either a face
name or an anonymous face.  This specifies a face which is an
aggregate of the attributes of each of the listed faces.
Faces occurring earlier in the list have higher priority.

It should be fixed in c763faf529ef2e8f257a27df29531a4f77d633f5. Thank
you for reporting it.


Regards,



Re: [O] 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/)]

2015-04-29 Thread Renato Ferreira
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



Re: [O] 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/)]

2015-04-28 Thread Nicolas Goaziou
Hello,

Renato  writes:

> I'm using release_8.2.10 and experienced the same problem.
>
> The problem seems to be the function org-agenda-fontify-priorities which
> calls:
> (org-face-from-face-or-color
>  'priority nil
>  (cdr (assoc p org-priority-faces)))
>
> which expects a face to inherit from. When org-priority-faces is nil or
> color or even does not specify the priority(e.g. "B") it inherits from
> nil and causes the message.

AFAIU, this isn't right. If (assoc p org-priority-faces) is nil, so is
its cdr and `org-face-from-face-or-color' returns nil, too. The `cond'
moves to the next branch.

> Setting it to something like 
>(quote
> ((65 . org-level-1)
>  (66 . org-level-2)
>  (67 . org-level-3)
>  (68 . org-level-4
>
> is a workaround to the problem.

It is. But it hides where the real problem is.

Do you have an ECM?

Regards,

-- 
Nicolas Goaziou



Re: [O] 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/)]

2015-04-27 Thread Renato
I'm using release_8.2.10 and experienced the same problem.

The problem seems to be the function org-agenda-fontify-priorities which
calls:
(org-face-from-face-or-color
   'priority nil
   (cdr (assoc p org-priority-faces)))

which expects a face to inherit from. When org-priority-faces is nil or
color or even does not specify the priority(e.g. "B") it inherits from
nil and causes the message.
Setting it to something like 
   (quote
((65 . org-level-1)
 (66 . org-level-2)
 (67 . org-level-3)
 (68 . org-level-4

is a workaround to the problem.

Renato



Re: [O] 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/)]

2013-10-28 Thread Nick Dokos
Paul Rankin  writes:

>  org-mode-hook '(#[nil

I would check this variable: the bug report is huge primarily because of
a lot of white space in the value of this variable. That might be an
artifact of mail/news software of course, but it does seem a bit
strange.

Nick