From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id IDKfCQkaCGbbOgAAqHPOHw:P1 (envelope-from ) for ; Sat, 30 Mar 2024 14:56:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id IDKfCQkaCGbbOgAAqHPOHw (envelope-from ) for ; Sat, 30 Mar 2024 14:56:25 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=strawberrytea.xyz header.s=fm3 header.b="Rif7sSv/"; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=qxozfG46; dmarc=pass (policy=none) header.from=strawberrytea.xyz; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711806984; a=rsa-sha256; cv=none; b=IR45i4vnbQTkbVkF1YsOh+3COL205XiacpIxalHI35jX2hUhWGiO2ovy/DOq6aPVjbjDtu 3/g0Px0/VGfxTi/W+i5EArF0HdRKgO8HFJ2UjtgaiapmjOvssAsAB8gEi5KxoGvCG9rtQM wRSSO4ckUYqD6GK48RCHPRdudOFtUkGtMAeGa8eZtkNvMUl3m6nYebnxpO0UoN1yUC8H// C6YhjNoholcfOuuQ+Meflcw6MSgWB6NsN3hgQzqTBlT28yFYLmbI7kYqST11YQxfeKri9z wz2ygfTnncJbH+xKt43N/QHuvy1h8Fv2OuEzkvRIkD9lVML0edUAo2bHmIm6Xw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=strawberrytea.xyz header.s=fm3 header.b="Rif7sSv/"; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=qxozfG46; dmarc=pass (policy=none) header.from=strawberrytea.xyz; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711806984; 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=5l2HGHQrIROXBjaXksMZ8/ibiWgvuUaDD1HCzR5cHy4=; b=dbF5O7m/I7epS1ymPRchfFk3jzEMne2Jb/HZZZdURROYmNMHHAx2fYjig4nHNbSXC3Vrrs PZvfv6XzfzO7YVlDXYDaYhaSoXs8bCYkuJhyFPBKtbJMA6+nXhSHSE/eAZQicYNKmlr8F6 Exg/wg4lCZ4RTwguPIHItwfW8X+isa9n6vIVUQPbrytFWxDL5QBK01rDq3MGfrMHb+6Xbo CcmAK38hXNjIO1fyJ9GHGwKIar6P3bQv1LfnklkI1KAofUZ8GdzaGvOt9J6uPNZOE74AJ1 8w+dFeR9cLUjoJOhAjFBaKXEsFBj2agpnvUC636A7SoiHWbtUT0+L22YUAZVAw== 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 59DF524A2B for ; Sat, 30 Mar 2024 14:56:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqZBA-0008Mg-Dc; Sat, 30 Mar 2024 09:55:28 -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 1rqZB6-0008MS-Uy for emacs-orgmode@gnu.org; Sat, 30 Mar 2024 09:55:25 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqZB5-0006lR-2p for emacs-orgmode@gnu.org; Sat, 30 Mar 2024 09:55:24 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id 68D3D5C006E; Sat, 30 Mar 2024 09:55:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sat, 30 Mar 2024 09:55:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= strawberrytea.xyz; h=cc:cc:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1711806920; x=1711893320; bh=5l2HGHQrIROXBjaXksMZ8/ibiWgvuUaDD1HCzR5cHy4=; b= Rif7sSv/VJPJTg+g7ejhZsgru6XGdCXeChp/kKcgbzVrzk/zn0oHcAE9tlB/c1W4 3lttcjioXHpfTb7Jt8X/Ay6v1rCcIVNlkiSKskD385MOLidSX78rJvDMvPrH/iWG 3F49WofoAfJA4ZawriYVpZ5BNVZqB2urHm7Uk7bNGS3FUmMmvJ2G0l0maG21DeD5 oO6OZY5pvOxicj0VeIYV9SstFiMa62mgIDfljq4Xy5ds7xlyy8P3RKCwbJ++GDy8 hFIBK+R1dOASCeWpKyxNZo/bJde2p7KPfzrtXOy/QDRXAeM+hjrpHaEwXg4D/2Mb wrIiHal8kCNcmp8GcZwMew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1711806920; x=1711893320; bh=5l2HGHQrIROXBjaXksMZ8/ibiWgv uUaDD1HCzR5cHy4=; b=qxozfG46vBW+G58EnhXbomLt/qOtbXoMAqqIAkEyeepz Z4OdhcptotTIEgYWeMqT2MKO7KBcs3Emb74dnAOQT6s1Kw+/53NJWdsB8lk729yQ ZegWfOT7i3x3xQLuaunGGRabwS2x9fplo7lg0eQf9OmYqXFKICzgy9K0i8GJ8eD/ yW3FNotbZnpW/JQn4vK9rMejzqFJE5j1TK96oWfIibLNLv0+ZTlY2kGMBaoM80Cp CHf9fB7kZa3ARtDhjKzAlzVDWcAHR6kemTC+nwjwEWaV+N/bKHlUQN+SxqEITUC/ DIIIPoGLB8lfQlhrbV457CeFxEjlz2Zln72Z8rBbIA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddvhedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlvdefmdenucfjughrpefhvf evufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefuthhrrgifsggvrhhrhifv vggruceolhhoohhksehsthhrrgifsggvrhhrhihtvggrrdighiiiqeenucggtffrrghtth gvrhhnpeduhfdvjeffkefhgeeiuddugfeuvdeutdffheekjeffvefhueeuieetjefffeej ieenucffohhmrghinhepfhhonhhtihhfihgtrghtihhonhdrohhrghenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlohhokhesshhtrhgrfigs vghrrhihthgvrgdrgiihii X-ME-Proxy: Feedback-ID: id85149b6:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 30 Mar 2024 09:55:19 -0400 (EDT) From: StrawberryTea To: Ihor Radchenko Cc: Protesilaos Stavrou , emacs-orgmode@gnu.org Subject: Re: [DISCUSSION] Face priority in Org fontification In-Reply-To: <87jzm0abrd.fsf@strawberrytea.xyz> (StrawberryTea's message of "Sun, 17 Mar 2024 14:39:34 -0500") References: <87le6zj9xt.fsf@strawberrytea.xyz> <875xy21e49.fsf@localhost> <87edce7ehv.fsf@protesilaos.com> <87r0geurzt.fsf@localhost> <87h6h9qieg.fsf@protesilaos.com> <87sf0riol4.fsf@localhost> <87jzm0abrd.fsf@strawberrytea.xyz> User-Agent: mu4e 1.12.2; emacs 30.0.50 Date: Sat, 30 Mar 2024 08:55:18 -0500 Message-ID: <87v853vn7d.fsf@strawberrytea.xyz> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=66.111.4.27; envelope-from=look@strawberrytea.xyz; helo=out3-smtp.messagingengine.com 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_PASS=-0.001 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-Spam-Score: -9.95 X-Migadu-Queue-Id: 59DF524A2B X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.95 X-TUID: /AEEPjIAwyyr StrawberryTea writes: > Ihor Radchenko writes: > >> Protesilaos Stavrou writes: >> >>> 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. >> >> This is relevant to any greater element that can contain markup inside >> and where we apply the fontification to both markup and contents: >> >> - headlines >> - tables >> - descriptive lists >> - commented headlines >> >> For headlines and tables, it /feels/ reasonable to apply the container >> face first and then prepend the markup faces. >> However, for descriptive lists and commented headlines, it is not so >> clear. For commented headlines that should fade out compared to ordinary >> headlines, prepending markup faces may lead to commented headlines >> standing out. > I do not know what you mean by commented headlines. Do you mean > headlines with the COMMENT keyword? I think it's better that the COMMENT > keyword blend in with the headline so that the headline does not look > broken. In the descriptive list case, it also makes sense for all the > themes I've tried because the result of `append` is that the date font > is bolded, which makes it look more aesthetically pleasing. > > Also, here is an updated version of the patch that covers all the > inline markup you said earlier except for inline source blocks: > > diff --git a/lisp/ol.el b/lisp/ol.el > index fa16b5920..b4253685f 100644 > --- a/lisp/ol.el > +++ b/lisp/ol.el > @@ -2223,8 +2223,8 @@ Also refresh fontification if needed." > ;; Some languages, e.g., Chinese, do not use spaces to > ;; separate words. Also allow to surround radio targets with > ;; line-breakable characters. > - (before-re "\\(?:^\\|[^[:alnum:]]\\|\\c|\\)\\(") > - (after-re "\\)\\(?:$\\|[^[:alnum:]]\\|\\c|\\)") > + (before-re "\\(?:^\\|[^[:alnum:]<]\\|\\c|\\)\\(") > + (after-re "\\)\\(?:$\\|[^[:alnum:]>]\\|\\c|\\)") > (targets > (org-with-wide-buffer > (goto-char (point-min)) > diff --git a/lisp/org.el b/lisp/org.el > index 33d90506b..ac2cd2bc4 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -5631,9 +5631,10 @@ by a #." > (match-string 1)) > (let ((end (match-end 1)) > (closing-start (match-beginning 1))) > - (add-text-properties > - begin end > - '(font-lock-multiline t font-lock-fontified t face org-macro)) > + (add-text-properties > + begin end > + '(font-lock-multiline t font-lock-fontified t)) > + (add-face-text-property begin end 'org-macro) > (org-remove-flyspell-overlays-in begin end) > (when org-hide-macro-markers > (add-text-properties begin opening-end '(invisible t)) > @@ -5678,14 +5679,14 @@ by a #." > (search-forward (or label "fn:")) > (org-remove-flyspell-overlays-in beg (match-end 0)))) > (add-text-properties beg end > - (list 'mouse-face 'highlight > - 'keymap org-mouse-map > - 'help-echo > - (if referencep "Footnote reference" > - "Footnote definition") > - 'font-lock-fontified t > - 'font-lock-multiline t > - 'face 'org-footnote)))))) > + (list 'mouse-face 'highlight > + 'keymap org-mouse-map > + 'help-echo > + (if referencep "Footnote reference" > + "Footnote definition") > + 'font-lock-fontified t > + 'font-lock-multiline t)) > + (add-face-text-property beg end 'org-footnote))))) > > (defun org-activate-dates (limit) > "Add text properties for dates." > @@ -5923,12 +5924,12 @@ needs to be inserted at a specific position in the font-lock sequence.") > ;; Link related fontification. > '(org-activate-links) > (when (memq 'tag org-highlight-links) '(org-activate-tags (1 'org-tag prepend))) > - (when (memq 'radio org-highlight-links) '(org-activate-target-links (1 'org-link t))) > - (when (memq 'date org-highlight-links) '(org-activate-dates (0 'org-date t))) > + (when (memq 'radio org-highlight-links) '(org-activate-target-links (1 'org-link prepend))) > + (when (memq 'date org-highlight-links) '(org-activate-dates (0 'org-date prepend))) > (when (memq 'footnote org-highlight-links) '(org-activate-footnote-links)) > ;; Targets. > - (list org-radio-target-regexp '(0 'org-target t)) > - (list org-target-regexp '(0 'org-target t)) > + (list org-radio-target-regexp '(0 'org-target prepend)) > + (list org-target-regexp '(0 'org-target prepend)) > ;; Diary sexps. > '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t)) > ;; Macro > > The only nuance I have noticed so far is that to prevent the radio link > from also inheriting the `org-link' face for itself, I had to modify the > target link regexp to exclude the `<' and `>' characters. > > StrawberryTea Hi. I'm following up on this thread as a friendly ping since I don't want this issue to be forgotten. I think the patch is ready for review. StrawberryTea