org-do-emphasis-faces: Make sure that 'invisible property is not sticky

* lisp/org.el (org-do-emphasis-faces): Mark invisible text property in
emphasis markers non-sticky.  This is usually not a problem as we
manage invisible text property via font-lock.  However subtle bugs may
exist with non-interactive calls to Elisp primitives that inherit text
properties (like `indent-to').

Reported-by: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Link: https://orgmode.org/list/8b691a7f-6b62-d573-e5a8-80fac3dc9bc6@vodafonemail.de
This commit is contained in:
Ihor Radchenko 2023-07-18 11:10:46 +03:00
parent 5b6268c29e
commit 3e3b873d3f
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 4 additions and 1 deletions

View File

@ -5150,8 +5150,11 @@ stacked delimiters is N. Escaping delimiters is not possible."
(not (org-at-comment-p))) (not (org-at-comment-p)))
(add-text-properties (match-end 4) (match-beginning 5) (add-text-properties (match-end 4) (match-beginning 5)
'(invisible t)) '(invisible t))
;; https://orgmode.org/list/8b691a7f-6b62-d573-e5a8-80fac3dc9bc6@vodafonemail.de
(org-rear-nonsticky-at (match-beginning 5))
(add-text-properties (match-beginning 3) (match-end 3) (add-text-properties (match-beginning 3) (match-end 3)
'(invisible t))) '(invisible t))
(org-rear-nonsticky-at (match-end 3)))
(throw :exit t)))))))) (throw :exit t))))))))
(defun org-emphasize (&optional char) (defun org-emphasize (&optional char)