From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 2IACCTPo5GW3bQEAe85BDQ:P1 (envelope-from ) for ; Sun, 03 Mar 2024 22:14:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2IACCTPo5GW3bQEAe85BDQ (envelope-from ) for ; Sun, 03 Mar 2024 22:14:27 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=strawberrytea.xyz header.s=fm2 header.b=NDqvGVoG; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=GAQQg1Q4; 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=pass (policy=none) header.from=strawberrytea.xyz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709500467; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VyjbmAaN0ay1udB7Ra7RJY7raSLiUwCW/NO5LFBEXf0=; b=svLroWbOERCKkkzqAFsFMN5g5JhMDR6ugVI831VkT1kLKeQPAAybbJP5QGCtr3C8saheXM B7pbHYkUct0dwa4EtYmziS8gE/nvhe/yQR8fTQORfbC/EwOnbgTHrIcvmod/6n76CC/bKP YdX+ZCs0XBfENE6l1mR8Ff9E/62JWYiK/hEzzzoG8rftjSeuQxns7HZ7i39UltWS19nSFg 7CoMcC8mYF4uOcWyGIoB6uZAMP1WL0fnIeRVR/be47ha0LYUKOs90ED7ui9sZOWR9ef0GE O+hnz9PHo3mBB8jcJCZupKDYIrOs0MA1QMyAeGoXnXPpOrfgHf34Z8va7LoWCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=strawberrytea.xyz header.s=fm2 header.b=NDqvGVoG; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=GAQQg1Q4; 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=pass (policy=none) header.from=strawberrytea.xyz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709500467; a=rsa-sha256; cv=none; b=ptQrbLbvEjUGT/oFCNNXt7DXUSdP/+CM7NsWCJRU+ER/bLM8p16wPypIBk1Bz687U4eA9g GBxZacWgc/yUbkY4Mtdj4Q6/DzHBOMy+XwxpdCJ5AAWnB1TGd2xExIoRREUH5twOYO+o1V PqqeWMQODaigyJjW/x8I2JdRw9mLgKlPvHJTS4TuZ4Zy44twq4XuWS7Gk6Cn9IKHP8VoZ2 /0hkVVKR8R9Nj+7qbI4buM53ZqUSCUCEzuWjS+M8s0ZCv3OsLT0HL5mRTVqIy2TFcHtiVU ZbYyid6h+bSa1rnqCdWzxYywYU1h0yu3t6UMyHFHoWsH7VOvEMnCQTiLzaQ8UQ== 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 AFF58213CE for ; Sun, 3 Mar 2024 22:14:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgt9D-0000R7-QY; Sun, 03 Mar 2024 16:13:27 -0500 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 1rgt9C-0000QJ-Pq for emacs-orgmode@gnu.org; Sun, 03 Mar 2024 16:13:26 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgt9A-0007tg-G3 for emacs-orgmode@gnu.org; Sun, 03 Mar 2024 16:13:26 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 2BA6132000D7; Sun, 3 Mar 2024 16:13:21 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sun, 03 Mar 2024 16:13:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= strawberrytea.xyz; h=cc:content-type:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1709500400; x=1709586800; bh=VyjbmAaN0a y1udB7Ra7RJY7raSLiUwCW/NO5LFBEXf0=; b=NDqvGVoGnAuY288VmtV9DASCIV vn2KutC1Dqp+DTLRKAkKF5iTT0aRxMyzGjhiYopz6aZDI6B/nj5keYFwvvOuCu1A mYqgZRgRwhPXZ2jCFln+wR8eiTr2S9WqGtK9w6MWFF+NKeM9jscKslVV4ylouiET J6NM2a5ePfQOauMPVxHB/B2q7PCEp3ZHqTL7uCA5tLZRLKcC0GmBlkdVpgFWK+px DKmMrbzDwyOVzZ1SC4e2R+ML98kTHS3K7UBmtDb7fhsx+SZS/khd4f+stiljD26s wi9qpzq3aFDosVz7ltp4unjy9+6OwkBPcC0mvOWtvEfzdxYLeKKOxiyQ80fg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1709500400; x=1709586800; bh=VyjbmAaN0ay1udB7Ra7RJY7raSLiUwCW/NO 5LFBEXf0=; b=GAQQg1Q4yFTOaLcM1ZsXxg27qCeJlk+VYNeKyB08YNRDC1onwYg V4h/uvMMQESS1IbzERNkVlu4s4bzkignXE+ZKRXUAHBq52d9VQ+gMoQn4Cczuo6A bCnmGgIf+ktkdRG7HmRVqi4IHd4Hzvg1oeDX2BhcBkROef59GSI7q7Pzux0ng6pH N01F+J4jsCnGwKg/Y+DGjSCawAhgPbFoLAvpZd4llA42osYGMXBLFjHQVbIc6sXm eNRWFN+THxUu6OEW2FUCWO5RSwPjO8w6M5hbMQJdrZaksK984sUf5JsZ65xus7vZ xX73Q2tpPHBhMoQs83BKwfmCNyLV+lVTZ3A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrheehgddugeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfeehmdenucfjughrpefhvf fufgffkfggtgesthdtredttdertdenucfhrhhomhepufhtrhgrfigsvghrrhihvfgvrgcu oehlohhokhesshhtrhgrfigsvghrrhihthgvrgdrgiihiieqnecuggftrfgrthhtvghrnh epgeekteeftdeitddvieegveduieelgfegledthffhtedvkeejkedvgfefheevtdeunecu ffhomhgrihhnpehgihhthhhusghushgvrhgtohhnthgvnhhtrdgtohhmpdhfohhnthhifh hitggrthhiohhnrdhorhhgpdhorhhgqdhouhhtlhhinhgvqdhrvghgvgigphdqsgholhdr ohhrghdpvghmrggtshdrlhhotggrlhenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehlohhokhesshhtrhgrfigsvghrrhihthgvrgdrgiihii X-ME-Proxy: Feedback-ID: id85149b6:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 3 Mar 2024 16:13:20 -0500 (EST) From: StrawberryTea To: emacs-orgmode@gnu.org Subject: [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/)] User-Agent: mu4e 1.12.0; emacs 30.0.50 Date: Sun, 03 Mar 2024 15:13:18 -0600 Message-ID: <87le6zj9xt.fsf@strawberrytea.xyz> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.147.123.25; envelope-from=look@strawberrytea.xyz; helo=wout2-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, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -10.47 X-Spam-Score: -10.47 X-Migadu-Queue-Id: AFF58213CE X-TUID: duINTcXV2/eN Hello. Currently, if you have a heading background, and you have a date, radio link, or special keyword, the background is overridden. I have attached a patch that fixes this issue by using the `prepend' property instead of the `t' property. Here is also a minimal example to reproduce the issue: (defvar bootstrap-version) ; bootstrapping straight.el (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (straight-use-package 'org) (require 'org) (load-theme 'leuven t) (dolist (face '(org-level-1 org-level-2 org-level-3 org-level-4 org-level-5 org-level-6 org-level-7 org-level-8)) (set-face-attribute face nil :extend t)) (setq org-fontify-whole-heading-line t) (scratch-buffer) (org-mode) (insert "<<>>\n* [2020-09-11 Fri] Headline 1\n * COMMENT Headline 2") If you would like to demo how the patch looks in emacs -Q, you can add this defun to the above code: (defun org-set-font-lock-defaults () "Set font lock defaults for the current buffer." (let ((org-font-lock-extra-keywords (list ;; Call the hook '(org-font-lock-hook) ;; Headlines `(,(if org-fontify-whole-heading-line "^\\(\\**\\)\\(\\* \\)\\(.*\n?\\)" "^\\(\\**\\)\\(\\* \\)\\(.*\\)") (1 (org-get-level-face 1)) (2 (org-get-level-face 2)) (3 (org-get-level-face 3))) ;; Table lines '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)\n?" (0 'org-table-row t) (1 'org-table t)) ;; Table internals '("^[ \t]*|\\(?:.*?|\\)? *\\(:?=[^|\n]*\\)" (1 'org-formula t)) '("^[ \t]*| *\\([#*]\\) *|" (1 'org-formula t)) '("^[ \t]*|\\( *\\([$!_^/]\\) *|.*\\)|" (1 'org-formula t)) '("| *\\(<[lrc]?[0-9]*>\\)" (1 'org-formula t)) ;; Properties (list org-property-re '(1 'org-special-keyword t) '(3 'org-property-value t)) ;; Drawers '(org-fontify-drawers) ;; 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 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)) ;; Diary sexps. '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t)) ;; Macro '(org-fontify-macros) ;; TODO keyword (list (format org-heading-keyword-regexp-format org-todo-regexp) '(2 (org-get-todo-face 2) prepend)) ;; TODO (when org-fontify-todo-headline (list (format org-heading-keyword-regexp-format (concat "\\(?:" (mapconcat 'regexp-quote org-not-done-keywords "\\|") "\\)")) '(2 'org-headline-todo prepend))) ;; DONE (when org-fontify-done-headline (list (format org-heading-keyword-regexp-format (concat "\\(?:" (mapconcat 'regexp-quote org-done-keywords "\\|") "\\)")) '(2 'org-headline-done prepend))) ;; Priorities '(org-font-lock-add-priority-faces) ;; Tags '(org-font-lock-add-tag-faces) ;; Tags groups (when (and org-group-tags org-tag-groups-alist) (list (concat org-outline-regexp-bol ".+\\(:" (regexp-opt (mapcar 'car org-tag-groups-alist)) ":\\).*$") '(1 'org-tag-group prepend))) ;; Special keywords (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t)) (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t)) (list (concat "\\<" org-closed-string) '(0 'org-special-keyword t)) (list (concat "\\<" org-clock-string) '(0 'org-special-keyword t)) ;; Emphasis (when org-fontify-emphasized-text '(org-do-emphasis-faces)) ;; Checkboxes `(,org-list-full-item-re 3 'org-checkbox prepend lax) (when (cdr (assq 'checkbox org-list-automatic-rules)) '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]" (0 (org-get-checkbox-statistics-face) prepend))) ;; Description list items '("\\(?:^[ \t]*[-+]\\|^[ \t]+[*]\\)[ \t]+\\(.*?[ \t]+::\\)\\([ \t]+\\|$\\)" 1 'org-list-dt prepend) ;; Inline export snippets '("\\(@@\\)\\([a-z-]+:\\).*?\\(@@\\)" (1 'font-lock-comment-face t) (2 'org-tag t) (3 'font-lock-comment-face t)) ;; ARCHIVEd headings (list (concat org-outline-regexp-bol "\\(.*:" org-archive-tag ":.*\\)") '(1 'org-archived prepend)) ;; Specials '(org-do-latex-and-related) '(org-fontify-entities) '(org-raise-scripts) ;; Code '(org-activate-code (1 'org-code t)) ;; COMMENT (list (format "^\\*+\\(?: +%s\\)?\\(?: +\\[#[A-Z0-9]\\]\\)? +\\(?9:%s\\)\\(?: \\|$\\)" org-todo-regexp org-comment-string) '(9 'org-special-keyword prepend)) ;; Blocks and meta lines '(org-fontify-meta-lines-and-blocks) '(org-fontify-inline-src-blocks) ;; Citations. When an activate processor is specified, if ;; specified, try loading it beforehand. (progn (unless (null org-cite-activate-processor) (org-cite-try-load-processor org-cite-activate-processor)) '(org-cite-activate)) '(org-activate-folds)))) (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords)) (run-hooks 'org-font-lock-set-keywords-hook) ;; Now set the full font-lock-keywords (setq-local org-font-lock-keywords org-font-lock-extra-keywords) (setq-local font-lock-defaults '(org-font-lock-keywords t nil nil backward-paragraph)) (setq-local font-lock-extend-after-change-region-function #'org-fontify-extend-region) (kill-local-variable 'font-lock-keywords) nil)) The patch is as follows: diff --git a/lisp/org.el b/lisp/org.el index 33d9050..e9b4eac 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5923,8 +5923,8 @@ 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)) @@ -5999,7 +5999,7 @@ needs to be inserted at a specific position in the font-lock sequence.") "^\\*+\\(?: +%s\\)?\\(?: +\\[#[A-Z0-9]\\]\\)? +\\(?9:%s\\)\\(?: \\|$\\)" org-todo-regexp org-comment-string) - '(9 'org-special-keyword t)) + '(9 'org-special-keyword prepend)) ;; Blocks and meta lines '(org-fontify-meta-lines-and-blocks) '(org-fontify-inline-src-blocks) Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0) of 2024-03-03 Package: Org mode version 9.7 (9.7-??-902dacb @ /home/st/.config/emacs/.local/straight/build-30.0.50/org/) Sincerely, StrawberryTea