all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 51577@debbugs.gnu.org
Subject: bug#51577: [External] : Re: bug#51577: 27.2; Regression: reproducible hang with face functions
Date: Wed, 03 Nov 2021 21:43:56 +0200	[thread overview]
Message-ID: <83a6ilgh37.fsf@gnu.org> (raw)
In-Reply-To: <SJ0PR10MB54884EBB4ED94D9D90372836F38C9@SJ0PR10MB5488.namprd10.prod.outlook.com> (message from Drew Adams on Wed, 3 Nov 2021 18:58:23 +0000)

> From: Drew Adams <drew.adams@oracle.com>
> CC: "51577@debbugs.gnu.org" <51577@debbugs.gnu.org>
> Date: Wed, 3 Nov 2021 18:58:23 +0000
> 
> > You set the region face to inherit from itself, and you expect that to
> > work without causing an infloop when Emacs tries to resolve some face
> > attribute?
> 
> Yes.  I expected Emacs to act as it has in the past,
> and ignore such an :inherit as a no-op.

What happened in the past was the result of the implementation, not
the design.  The implementation changed (for valid reasons), so the
undefined behavior your code invokes now gets you in trouble.

> > If FACE1 has some attribute 'unspecified', but inherits
> > from FACE2, Emacs will try to go up the inheritance chain to see if
> > some of the parent faces specifies that attribute.  If FACE1 inherits
> > from itself, going up the inheritance chain will never end.
> 
> Only if the implementation doesn't recognize the
> inheritance loop.

What would you expect it to do if it did?

And how does your code differ from this:

  (while t nil)

Or would you consider it a bug that Emacs doesn't detect the infinite
while-loop, either?

> > IOW, it's a cockpit error.
> 
> You can look at it that way.  But I'd expect that
> inheritance of a face from itself would be a no-op.

Why?

> And that's exactly what the case was in Emacs 26.

Yes, undefined behavior can do different things in different versions.

> Why should the code now chase its tail down an
> infinite rabbit hole?  Is this really by design?

The design is to chase the inheritance chain, yes.  Why is it needed
is a long story, and isn't really relevant for the issue at hand, as
long as it isn't a bug or faulty design.  Faces aren't supposed to
inherit from themselves, period.

> Not rhetorical questions.  It seems like a design
> change has been made, but with no announcement.

The announcement _was_ made, but we announce features, not their
designs.





  reply	other threads:[~2021-11-03 19:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  2:44 bug#51577: 27.2; Regression: reproducible hang with face functions Drew Adams
2021-11-03 17:10 ` Eli Zaretskii
2021-11-03 18:58   ` bug#51577: [External] : " Drew Adams
2021-11-03 19:43     ` Eli Zaretskii [this message]
2021-11-04 18:15       ` Lars Ingebrigtsen
2021-11-04 18:48         ` martin rudalics
2021-11-04 18:50           ` Lars Ingebrigtsen
2021-11-04 19:32           ` Eli Zaretskii
2021-11-04 19:01         ` Eli Zaretskii
2021-11-04 19:21           ` bug#51577: [External] : " Drew Adams
2021-11-04 22:56           ` Lars Ingebrigtsen
2021-11-05  2:41             ` bug#51577: [External] : " Drew Adams
2021-11-05  7:32               ` Eli Zaretskii
2021-11-05  7:19             ` Eli Zaretskii
2021-11-05 13:24               ` Lars Ingebrigtsen
2021-11-05 14:22                 ` Eli Zaretskii
2021-11-06  0:39                   ` Lars Ingebrigtsen

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=83a6ilgh37.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=51577@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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.