emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Ypo <ypuntot@gmail.com>
Cc: Diego Zamboni <diego@zzamboni.org>, Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Separator "::" -> what is it for in headlines?
Date: Sun, 02 May 2021 20:21:29 +0800	[thread overview]
Message-ID: <87im41ba2e.fsf@localhost> (raw)
In-Reply-To: <883253ec-7199-f97c-0e47-2a7ffa8dfdbc@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-description-list-item-regexp-when-fontifying-ite.patch --]
[-- Type: text/x-diff, Size: 1248 bytes --]

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	other threads:[~2021-05-02 12:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 13:11 Separator "::" -> what is it for in headlines? Ypo
2021-05-01 17:18 ` Diego Zamboni
2021-05-02 11:28   ` Ypo
2021-05-02 12:21     ` Ihor Radchenko [this message]
2021-05-02 17:31       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87im41ba2e.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=diego@zzamboni.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=ypuntot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).