From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gN9fBM/C8mVJfAEAqHPOHw:P1 (envelope-from ) for ; Thu, 14 Mar 2024 10:26:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gN9fBM/C8mVJfAEAqHPOHw (envelope-from ) for ; Thu, 14 Mar 2024 10:26:39 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protesilaos.com header.s=gm1 header.b=ToNdMSqB; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710408398; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QMnINTQ0IhqKj5dRC3Ow5anBOPF7aNdGuW1mcSosgok=; b=R9BRlEjpf6BMK/42xBjuh89eoxWlFriX9DNL6/4PmcEe0s5X5+nIEKaAspl/2DO8wLm7s4 CbplPPSfasoN4ZYOJLKLAs5Uw6fQKb0DFY568mN3UYb1m+xKqcr3S7232KmtNJDadGmd0g mfJTuZyAo6fJQZg+90VHBMa3CXEwmvmZMDhRD4rFt6n0XoqNMAxIHyMlVcm8tx8o0qmGof 170kzpODfPqdRckHgMuujD9PamezbbSqz0HQEL27+giQF/q2Xa75GxppfG5h8ziDP0euSe R/xafDWH9XDl+1A1A9yd+5RI+Tq/XJJMjIJDsDNIBpR3hjCDv/OitByRZ0ZsMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710408398; a=rsa-sha256; cv=none; b=FUkWXX46yLd0TVaFHuE3mdVTFaLSpSZNWmONSuLOaK7kcsZ0bQXX1N8WGWEgIqkizSPjlS rUAobnvS0f4W6Zl59hAuiZKetOnotEA2ELfzKnbymvJXR//LV2gqtTMXmCw+RAIlFA8iOM nY2cus5w17LG3UouEmKFPV4a+wcU+jD8KUTKpGsGrCx6ZYu6SgBaiJ0QicLMh5tv+Useij bwYo6jK2hpEgmifi3F+S1EMZvxCOIULqDgNAUzmj0kbgLcr0wcD6oIg4hSB93b8GOtyKK0 ymTktirx0JbN4Uiucwlrn+5CLCdVHyFpiRj0kYg0+HK7lRanl1+AkseqGOcSzQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protesilaos.com header.s=gm1 header.b=ToNdMSqB; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E466C6F239 for ; Thu, 14 Mar 2024 10:26:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkhGR-0002df-2S; Thu, 14 Mar 2024 05:20:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkhGP-0002d0-8g for emacs-orgmode@gnu.org; Thu, 14 Mar 2024 05:20:37 -0400 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkhGM-0007Ks-R3 for emacs-orgmode@gnu.org; Thu, 14 Mar 2024 05:20:37 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id EC59AFF80B; Thu, 14 Mar 2024 09:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1710408029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QMnINTQ0IhqKj5dRC3Ow5anBOPF7aNdGuW1mcSosgok=; b=ToNdMSqB0FoRsZFT8hUhfivT3Uhlz2mmuEGyKWtXgQmd8BCzVXyGnbHkef4CoZ1nCeRb7V vSq7M164wV7K8ThLLLN3y+T6l0SLQdz/84J/TCqeUQxXBtYBXObjG0z3yRJ/8tUHEzeyz9 NYq2mqWXWrVFOhR3Womf6fJwWa8S7kHz4o6Ealyp4TBnlwMkKfeGAstkv+7IWUDIp6Tzw3 wxC7kRUBJX7UQ+IkKw+v6AJCs15GTqd1O0CT+HQUtEd/hOriPdYVhsPgQEufc7hULsLAqv iCV3muknYsxBaypg1LTwFccj/FtPQm7KcEyySHj5CRq2jUZZKWQpTVCNOro7gQ== From: Protesilaos Stavrou To: Ihor Radchenko Cc: StrawberryTea , emacs-orgmode@gnu.org Subject: Re: [DISCUSSION] Face priority in Org fontification (was: [BUG] org dates, radio links, and special keywords override heading backgrounds [9.7 (9.7-??-902dacb @ /home/st/.config/emacs/.local/straight/build-30.0.50/org/)]) In-Reply-To: <87r0geurzt.fsf@localhost> References: <87le6zj9xt.fsf@strawberrytea.xyz> <875xy21e49.fsf@localhost> <87edce7ehv.fsf@protesilaos.com> <87r0geurzt.fsf@localhost> Date: Thu, 14 Mar 2024 11:20:23 +0200 Message-ID: <87h6h9qieg.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: info@protesilaos.com Received-SPF: none client-ip=2001:4b98:dc4:8::229; envelope-from=info@protesilaos.com; helo=relay9-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.18 X-Spam-Score: -3.18 X-Migadu-Queue-Id: E466C6F239 X-Migadu-Scanner: mx11.migadu.com X-TUID: cNRR4PJ+NRm0 > From: Ihor Radchenko > Date: Wed, 13 Mar 2024 14:27:18 +0000 > [... 16 lines elided] >>> CCing Protesilaos. This discussion might be of interest for him. >> >> I think it makes sense to not override the background because otherwise >> the heading can look visually "broken". See attached screenshot for an >> example: it is called "demo-org-heading-with-background.png". In that >> screenshot I include an overline for the heading, to show how this is >> not limited to the background colour but extends to all face attributes. >> To this end, I also attach "demo-org-heading-with-more-height.png" which >> shows how the date is not scaling to match the heading's increased text >> height. > > I agree that override (what we do now) is clearly not good. > The question, however, is whether we should prioritize object face over > the containing element face or vice versa: > > Should link properties take precedence over headline or should headline > properties take precedence? > > For example, if link explicitly sets face height to be smaller, should > we honor it? Or should we honor the headline face height, if set? > Similar for background. In your example, the white background override > does not really look nice when heading has its own background. This can get tricky, I know. The idea is to make this behave how all faces relate to the 'default' face with regard to their 'undefined' attributes. Namely, if a face defines an attribute, then it overrides the 'default' face, otherwise it falls back to it for the value of the given attribute. In the case of the headlines then, every other element should attain the attributes of the heading unless it explicitly overrides them. So a link with an 'undefined' height will be as high as the heading, but a link with a height of, say, 1.0 will keep that height even if the heading is at a 2.0 height (or whatever). Same idea for all face attributes. Now the tricky part is to figure out which combinations can work this way. Headings and source blocks are two obvious ones. Maybe there are more, but I cannot think of one right now. -- Protesilaos Stavrou https://protesilaos.com