all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: how to track down "invalid face attribute" errors?
Date: Wed, 05 Oct 2022 16:51:19 +0300	[thread overview]
Message-ID: <834jwitm3s.fsf@gnu.org> (raw)
In-Reply-To: <87a66acuyj.fsf@sperrhaken.name> (message from Felix Dietrich on Wed, 05 Oct 2022 14:32:04 +0200)

> From: Felix Dietrich <felix.dietrich@sperrhaken.name>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 05 Oct 2022 14:32:04 +0200
> 
> But “xfaces.c:merge_face_ref” (which produces the error message) has a
> “struct window w” parameter.  I believe in cases where it is not NULL,
> which it isnʼt when running the above code, this could be used to derive
> the buffer and the bufferʼs position using the struct members “contents”
> and “pointm’:

Face merging has nothing to do with point, it just considers the face
attributes.  The commentary to merge_face_ref says how the window
pointer is used:

  /* Merge face attributes from the lisp `face reference' FACE_REF on
     frame F into the face attribute vector TO as appropriate for
     window W; W is used only for filtering face specs.
	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you want to understand what that filtering is about, look at
filter_face_ref, where you will clearly see that it never accesses the
window's buffer or its point.

So when this function is called, there's no reason to believe that the
buffer position of point has anything to do with the offending face.
The most frequent face merging is performed by redisplay, which
doesn't move point and doesn't make the window on whose display it is
working the selected window.

> Anyway, perhaps, if there is any interest in adding information to the
> “Invalid face attribute” log message, further discussion should move to
> a wishlist bug report?

Definitely.  This discussion doesn't belong to the help list.



  parent reply	other threads:[~2022-10-05 13:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 12:03 how to track down "invalid face attribute" errors? Eric S Fraga
2022-09-25 13:00 ` Emanuel Berg
2022-09-26  9:04   ` Eric S Fraga
2022-09-26  9:40     ` Robert Pluim
2022-09-26  9:50       ` Fraga, Eric
2022-09-27 11:12       ` Felix Dietrich
2022-09-27 14:08         ` Robert Pluim
2022-10-05 12:32           ` Felix Dietrich
2022-10-05 13:31             ` Robert Pluim
2022-10-05 13:51             ` Eli Zaretskii [this message]
2022-10-06 14:58               ` Felix Dietrich
2022-09-28 11:41   ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-28 15:04     ` Robert Pluim
2022-09-29 16:32     ` Emanuel Berg
2022-10-03 19:19       ` Felix Dietrich
2022-10-03 22:46         ` Emanuel Berg
2022-10-04 11:06         ` Felix Dietrich
2022-10-05 11:29           ` Felix Dietrich
2022-09-25 14:01 ` Eli Zaretskii
2022-09-25 15:53   ` Eric S Fraga
2022-09-25 16:06     ` Eli Zaretskii
2022-09-25 17:20       ` Eric S Fraga
2022-09-25 14:26 ` Felix Dietrich
2022-09-25 15:51   ` Fraga, Eric

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834jwitm3s.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.