emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] "Invalid face reference" with org-agenda-deadline-faces


From: Ihor Radchenko
Subject: Re: [BUG] "Invalid face reference" with org-agenda-deadline-faces
Date: Wed, 10 Jan 2024 18:48:55 +0000

Mark Kerr <mkerr23@gmail.com> writes:

>> > Invalid face reference: org-agenda-deadline-today [6 times]
>> > Invalid face reference: org-agenda-deadline-past [19 times]
>> > ---
>>
>> These two faces have nothing to do with Org mode. Org mode simply does
>> not define such faces and never did (I cannot find these face names in
>> git history). In fact, Org mode does not define any of the faces in you
>> custom value.
>>
> I understand that, but the whole point of 'org-agenda-deadline-faces'  is
> that it  allows you to create *new faces*. So of course those user-defined
> faces wouldn't be in the code.

> For example, you could create a custom face called "deadline50" for any
> todo's whose deadline warning time has elapsed by 50%, and change it's face
> color to indicate that state in the agenda.
>
> From the docs for org-agenda-deadline-faces:
> Faces for showing deadlines in the agenda. This is a list of cons cells.
> The cdr of each cell is a face to be used, and it can also just be like
> (:foreground "yellow"). Each car is a fraction of the head-warning time
> that must have passed for this the face in the cdr to be used for display.
> The numbers must be
> given in descending order.  The head-warning time is normally taken from
> ‘org-deadline-warning-days’, but can also be specified in the deadline
> timestamp itself.

>> This `org-agenda-deadline-faces` settings has been working without any
>> > problems for years. I think the problem began with org v6.6.16, but am
>> not
>> > completely certain.
>>
>> I am not sure what you mean by "working" - incorrect faces could have
>> been ignored by older Emacs. Newer Emacs indicate the problem with
>> invalid faces.
>
> By "working", I mean that my 'org-agenda-deadline-faces' settings have
> functioned as described in the documentation for years.
>
> In other words , my custom faces were created  and appeared in the agenda
> with the attributes I specified at the time I specified.

Faces that you reference from org-agenda-deadline-faces should exist and
should be valid faces. However, it does not look like your
`org-agenda-deadline-past' and `org-agenda-deadline-today' faces are
defined correctly. You might have used malformed face declaration.

May you show how you define these custom faces in your config?

>> Canceled.
>> --
>> Ihor Radchenko // yantar92,
>
> I don't think this should be cancelled at this point, since the reasoning
> was based upon an incorrect assumption of how org-agenda-deadline-faces
> works.

I do not see any problem in how org-agenda handles this variable. I
suspect that the problem is in your config.

If you think that the problem is on Org side, please provide a minimal
reproducer starting from emacs -Q. See
https://orgmode.org/manual/Feedback.html#Feedback

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]