unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Invalid face reference: nil [296 times]
@ 2018-03-09 14:03 zhang cc
  0 siblings, 0 replies; 5+ messages in thread
From: zhang cc @ 2018-03-09 14:03 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

I see some error message in the *Message* buffer like this:

Invalid face reference: nil [296 times]


I don’t known when it was printed. I didn’t see it in minibuffer.
Maybe there is a invalid face? Can the face name be printed?
How to debug this?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Invalid face reference: nil [296 times]
       [not found] <mailman.10327.1520609117.27995.help-gnu-emacs@gnu.org>
@ 2018-03-09 15:36 ` Emanuel Berg
  2018-03-09 16:16   ` Michael Heerdegen
       [not found]   ` <mailman.10331.1520612210.27995.help-gnu-emacs@gnu.org>
  2018-05-15  8:11 ` andlind
  1 sibling, 2 replies; 5+ messages in thread
From: Emanuel Berg @ 2018-03-09 15:36 UTC (permalink / raw)
  To: help-gnu-emacs

zhang cc wrote:

> I don’t known when it was printed. I didn’t
> see it in minibuffer. Maybe there is
> a invalid face? Can the face name be printed?
> How to debug this?

Check your init files for all references to
"face", then look for anything in particular
that looks suspicious...

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Invalid face reference: nil [296 times]
  2018-03-09 15:36 ` Emanuel Berg
@ 2018-03-09 16:16   ` Michael Heerdegen
       [not found]   ` <mailman.10331.1520612210.27995.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2018-03-09 16:16 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <moasen@zoho.com> writes:

> > I don’t known when it was printed. I didn’t see it in
> > minibuffer. Maybe there is a invalid face? Can the face name be
> > printed?  How to debug this?
>
> Check your init files for all references to "face", then look for
> anything in particular that looks suspicious...

You can also try to find out if these messages only appear when windows
whose buffers are in a certain mode are selected, so that you have a
hint where the problem could come from.

Besides that, AFAICT there is no straightforward way to debug this with
a debugger or so.  Bisecting your init file always works of course but
is not very effective.


Michael.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Invalid face reference: nil [296 times]
       [not found]   ` <mailman.10331.1520612210.27995.help-gnu-emacs@gnu.org>
@ 2018-03-09 16:22     ` Emanuel Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2018-03-09 16:22 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Heerdegen wrote:

> Besides that, AFAICT there is no
> straightforward way to debug this with
> a debugger or so. Bisecting your init file
> always works of course but is not
> very effective.

If you care about efficiency, probably should
throw those init files away, right? :)

No, but it can be made more efficient if they
are organized. For example, one can have one
file called my-faces.el and all face stuff goes
into there. So when there is a face related
problem, in the main init file just comment-out
that line which loads the face file.

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Invalid face reference: nil [296 times]
       [not found] <mailman.10327.1520609117.27995.help-gnu-emacs@gnu.org>
  2018-03-09 15:36 ` Emanuel Berg
@ 2018-05-15  8:11 ` andlind
  1 sibling, 0 replies; 5+ messages in thread
From: andlind @ 2018-05-15  8:11 UTC (permalink / raw)
  To: help-gnu-emacs

On Friday, 9 March 2018 16:25:19 UTC+1, zhang cc  wrote:
> I see some error message in the *Message* buffer like this:
> 
> Invalid face reference: nil [296 times]
> 
> 
> I don’t known when it was printed. I didn’t see it in minibuffer.
> Maybe there is a invalid face? Can the face name be printed?
> How to debug this?

Does it disappear if you turn font-lock globally off?

If so, turn it back on in buffer after buffer util it appears again.

Once you have found a buffer that triggers the problem, you can inspect the font-lock rules to see if you find a bad face reference.

One way of doing this is to single-step the font-lock rules using `font-lock-studio' (available from Melpa).

If font-lock isn't causing this, check if you have a custom setup for the mode line, or anything else face-related in your init file.

    -- Anders


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-15  8:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-09 14:03 Invalid face reference: nil [296 times] zhang cc
     [not found] <mailman.10327.1520609117.27995.help-gnu-emacs@gnu.org>
2018-03-09 15:36 ` Emanuel Berg
2018-03-09 16:16   ` Michael Heerdegen
     [not found]   ` <mailman.10331.1520612210.27995.help-gnu-emacs@gnu.org>
2018-03-09 16:22     ` Emanuel Berg
2018-05-15  8:11 ` andlind

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