* 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-27 8:30 Paul Rankin
2013-10-28 14:38 ` Nick Dokos
0 siblings, 1 reply; 6+ messages in thread
From: Paul Rankin @ 2013-10-27 8:30 UTC (permalink / raw)
To: emacs-orgmode
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
http://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------
It appears that after an update to 8.2.1, setting any task to priority level #B causes endless messages of `Invalid face reference: nil [n times]` when viewing the Agenda buffer. The message repeats every time the Agenda buffer is viewed or the mouse moves over the day of the #B priority task.
The message stops if the priority is changed to #A or #C or removed.
Emacs : GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00)
of 2013-10-23 on Paul-Rankins-iMac.local
Package: Org-mode version 8.2.1 (8.2.1-15-ge5cecc-elpa @ /Users/Paul/.emacs.d/elpa/org-20131021/)
current state:
==============
(setq
org-hide-block-startup t
org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-latex-default-packages-alist '(("" "xltxtra" t) ("" "realscripts" nil)
("" "enumerate" t) ("" "multicol" t)
("style=english" "csquotes" t)
("australian" "babel" t)
"\\MakeOuterQuote{\"}")
org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-log-done 'time
org-archive-reversed-order t
org-confirm-shell-link-function 'yes-or-no-p
org-support-shift-select 'always
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-mode-hook '(#[nil
"\305\x10\306 >\203\x14\307\n\310\311#\210\307\v\312\313#\210\307\v\314\315#\210\306 >\203,\307\n\316\317#\210\307\n\320\321#\210\322 >\203>\307\v\323\324#\210\307\v\325\324#\210\326 >\203P\307\n\327\317#\210\307\n\330\321#\210\331 >\203_\332\311\f\333BC\334#\210\335 >\203k\332\311\336\334#\210\337 >\203w\332\311\340\334#\210\341\342\343\344\311$\210\345\342\311\"\210\342\207"
[org-mouse-context-menu-function
org-mouse-features
org-mouse-map
org-mode-map
org-outline-regexp
org-mouse-context-menu
context-menu
org-defkey
[mouse-3]
nil
[mouse-3]
org-mouse-show-context-menu
[down-mouse-1]
org-mouse-down-mouse
[C-drag-mouse-1]
org-mouse-move-tree
[C-down-mouse-1]
org-mouse-move-tree-start
yank-link
[S-mouse-2]
org-mouse-yank-link
[drag-mouse-3]
move-tree
[drag-mouse-3]
[down-mouse-3]
activate-stars
font-lock-add-keywords
(0
(\`
(face
org-link
mouse-face
highlight
keymap
(\, org-mouse-map)
)
)
(quote prepend)
)
t
activate-bullets
(("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +"
(1
(\`
(face
org-link
keymap
(\, org-mouse-map)
mouse-face highlight)
)
(quote prepend)
)
)
)
activate-checkboxes
(("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)"
(2
(\`
(face
bold
keymap
(\, org-mouse-map)
mouse-face highlight)
)
t)
)
)
ad-add-advice
org-open-at-point
(org-mouse-open-at-point
nil
t
(advice
lambda
nil
(let
((context
(org-context)
)
)
(cond
((assq :headline-stars context)
(org-cycle)
)
((assq :checkbox context)
(org-toggle-checkbox)
)
((assq :item-bullet context)
(let
((org-cycle-include-plain-lists t)
)
(org-cycle)
)
)
((org-footnote-at-reference-p)
nil)
(t ad-do-it)
)
)
)
)
around ad-activate]
5]
#[nil
"\b\205\x1c\302 \205\x1c\303\304\302 !\305P!\x19\306 !\205^[\307 !)\207"
[org-ctags-enabled-p tags-filename buffer-file-name
expand-file-name file-name-directory "/TAGS" file-exists-p
visit-tags-table]
3]
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook org-show-block-all
append local]
5]
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-refile-targets '((org-agenda-files :maxlevel . 5))
org-agenda-mouse-1-follows-link t
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-refile-use-outline-path 'file
org-directory "~/Documents/Org"
org-enforce-todo-dependencies t
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-enforce-todo-checkbox-dependencies t
org-hide-emphasis-markers t
org-modules '(org-ctags org-mouse)
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-agenda-show-inherited-tags nil
org-blocker-hook '(org-block-todo-from-checkboxes
org-block-todo-from-children-or-siblings-or-parent)
org-agenda-timegrid-use-ampm t
org-agenda-mode-hook '(#[nil
"\302\x10\303 \304\305#\210\303 \306\307#\210\303 \310\311#\210\303 \312\313#\210\303 \314\315#\207"
[org-mouse-context-menu-function
org-agenda-mode-map
org-mouse-agenda-context-menu
org-defkey
[mouse-3]
org-mouse-show-context-menu
[down-mouse-3]
org-mouse-move-tree-start
[C-mouse-4]
org-agenda-earlier
[C-mouse-5]
org-agenda-later
[drag-mouse-3]
#[(event)
"\302\b!\x19\303 \304\"\203\x11\305\306!\202^[\303 \307\"\205^[\310\306!)\207"
[event --cl-var-- org-mouse-get-gesture eql :left org-agenda-earlier 1 :right org-agenda-later]
3 nil "e"]
]
4]
)
org-agenda-files '("~/Documents/Org/reminders.txt" "~/Documents/Org/Work.org"
"~/Documents/Org/Home.org")
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-agenda-skip-scheduled-if-deadline-is-shown t
org-agenda-confirm-kill t
)
^ permalink raw reply [flat|nested] 6+ messages in thread
* 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/)]
2013-10-27 8:30 Paul Rankin
@ 2013-10-28 14:38 ` Nick Dokos
0 siblings, 0 replies; 6+ messages in thread
From: Nick Dokos @ 2013-10-28 14:38 UTC (permalink / raw)
To: emacs-orgmode
Paul Rankin <paul@tilk.co> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* 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/)]
@ 2015-04-23 21:21 Renato
2015-04-28 19:22 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: Renato @ 2015-04-23 21:21 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* 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/)]
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
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-04-28 19:22 UTC (permalink / raw)
To: Renato; +Cc: emacs-orgmode
Hello,
Renato <renatofdds@gmail.com> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* 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/)]
2015-04-28 19:22 ` Nicolas Goaziou
@ 2015-04-29 11:52 ` Renato Ferreira
2015-04-29 21:36 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: Renato Ferreira @ 2015-04-29 11:52 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* 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/)]
2015-04-29 11:52 ` Renato Ferreira
@ 2015-04-29 21:36 ` Nicolas Goaziou
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2015-04-29 21:36 UTC (permalink / raw)
To: Renato Ferreira; +Cc: emacs-orgmode
Renato Ferreira <renatofdds@gmail.com> 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,
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-04-29 21:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).