emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: No Wayman <iarchivedmywholelife@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug: [PATCH] org-agenda: "Invalid face reference: t" errors [9.4 (release_9.4-49-g4b150d @ /home/n/.emacs.d/straight/build/org/)]
Date: Tue, 06 Oct 2020 01:44:24 -0400	[thread overview]
Message-ID: <87v9fnc3if.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]


I noticed recently that my message buffer was getting clobbered 
with thousands of Invalid face reference errors when moving point 
around an org-agenda buffer. e.g.:

> Invalid face reference: t [4519 times]

Git bisect points to commit 
7a12e149907b5921011710d869b7554c35859c89

> org.el (org-display-outline-path): Fix faces of the message
>
> * lisp/org.el (org-display-outline-path): Set :height as the
> default face height, and don't change other face attributes.
>
> See a3576543f for a previous fix, and this discussion:
> <https://orgmode.org/list/21ef0e94-e766-455c-a45c-fe30e316c121@Spark>

As a workaround, setting `org-agenda-show-outline-path' to nil 
prevents the errors.
I believe the face spec in the call to `add-face-text-property' in 
`org-display-outline-path' is incorrect.
The attached patch replaces it with an anonymous face, which works 
on my end.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-agenda-invalid-face-ref-fix --]
[-- Type: text/x-patch, Size: 943 bytes --]

From 4b150d7ca3f8d7d9fe30f6b562b35a5f4072e5e1 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Tue, 6 Oct 2020 01:30:09 -0400
Subject: [PATCH] org.el (org-display-outline-path): Fix invalid face reference
 error

* lisp/org.el (org-display-outline-path): Use an anonymous face when
adding default :height to outline path
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 425e9391b..beb830b36 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8057,7 +8057,7 @@ If JUST-RETURN-STRING is non-nil, return a string, don't display a message."
 	   (and file bfn (concat (file-name-nondirectory bfn) separator))
 	   separator))
     (add-face-text-property 0 (length res)
-			    `((t :height ,(face-attribute 'default :height)))
+			    `(:height ,(face-attribute 'default :height))
 			    nil res)
     (if just-return-string
 	res
-- 
2.28.0


             reply	other threads:[~2020-10-06  5:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06  5:44 No Wayman [this message]
2020-10-06 21:38 ` Bug: [PATCH] org-agenda: "Invalid face reference: t" errors [9.4 (release_9.4-49-g4b150d @ /home/n/.emacs.d/straight/build/org/)] Samuel Wales
2020-10-07  4:50 ` Kyle Meyer

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=87v9fnc3if.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).