On 2020-10-07, 00:20 -0400, Kyle Meyer <k...@kyleam.com> wrote:

> Protesilaos Stavrou writes:
>
>> Sorry to re-open this issue.  The following change extends Ihor's patch
>> to also cover checkbox statistics.  Seems to work just fine on my end.
>> Thanks again!
>
> Thanks for the patch.  Looks good on my end too.
>
> Would you mind adding a commit message and sending the git-format-patch
> output (details at <https://orgmode.org/worg/org-contribute.html>)?

Tried to format the patch.  Please see the attached file.  If it does
not work, feel free to dismiss it and just apply the change yourself.

-- 
Protesilaos Stavrou
protesilaos.com
>From 6fc8c6f2c5c81402e2d4a5416b68d8d595f7aaee Mon Sep 17 00:00:00 2001
From: Protesilaos Stavrou <i...@protesilaos.com>
Date: Wed, 7 Oct 2020 08:04:24 +0300
Subject: [PATCH] Make headline faces precede checkbox statistics

* lisp/org.el (org-set-font-lock-defaults): Apply `prepend' to
checkbox statistics.  Affects `org-checkbox-statistics-done' and
`org-checkbox-statistics-todo'.

This builds on commit 979e82fc3: org-level-N faces are no longer
overridden by elements placed on top of them.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 425e9391b..23c86ba0c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5684,7 +5684,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
 	     1 'org-checkbox prepend)
 	   (when (cdr (assq 'checkbox org-list-automatic-rules))
 	     '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
-	       (0 (org-get-checkbox-statistics-face) t)))
+	       (0 (org-get-checkbox-statistics-face) prepend)))
 	   ;; Description list items
 	   '("^[ \t]*[-+*][ \t]+\\(.*?[ \t]+::\\)\\([ \t]+\\|$\\)"
 	     1 'org-list-dt prepend)
-- 
2.28.0

Reply via email to