emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Separator "::" -> what is it for in headlines?


From: Ihor Radchenko
Subject: Re: Separator "::" -> what is it for in headlines?
Date: Sun, 02 May 2021 20:21:29 +0800

Ypo <ypuntot@gmail.com> writes:

> Same issue:
> * *To **the left of* :: it's bold

I can reproduce. The issue appears only in level 1 headlines because of
wrong regexp in font-lock-keywords. The attach patch should fix the
problem.

Best,
Ihor

>From 791471a5f28723f5d3b34a9345795e0f2902b9b6 Mon Sep 17 00:00:00 2001
Message-Id: 
<791471a5f28723f5d3b34a9345795e0f2902b9b6.1619957998.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Sun, 2 May 2021 20:16:44 +0800
Subject: [PATCH] Fix description list item regexp when fontifying "*" items

* lisp/org.el (org-set-font-lock-defaults): Avoid fontifying headlines
with "::" as description list items.  Lists can start with "*", but
"*" must not be at the beginning of line.  Old regexp did not require
whitespace before "*" in description list items.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 5cc37a57e..53ff5d463 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5582,7 +5582,7 @@ (defun org-set-font-lock-defaults ()
             '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]"
               (0 (org-get-checkbox-statistics-face) prepend)))
           ;; Description list items
-          '("^[ \t]*[-+*][ \t]+\\(.*?[ \t]+::\\)\\([ \t]+\\|$\\)"
+           '("\\(?:^[ \t]*[-+]\\|^[ \t]+[*]\\)[ \t]+\\(.*?[ \t]+::\\)\\([ 
\t]+\\|$\\)"
             1 'org-list-dt prepend)
            ;; Inline export snippets
            '("\\(@@\\)\\([a-z-]+:\\).*?\\(@@\\)"
-- 
2.26.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]