emacs-orgmode
[Top][All Lists]
Advanced

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

[PATCH v2 25/38] Fix bug in org-get-headingFixes #26, where fontificatio


From: Anders Johansson
Subject: [PATCH v2 25/38] Fix bug in org-get-headingFixes #26, where fontification could make the matching and extraction of heading
Date: Wed, 20 Apr 2022 21:26:53 +0800

Fixes #26, where fontification could make the matching and extraction of heading
components fail.
---
 lisp/org.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 0f31e7794..ff17bf001 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6167,8 +6167,9 @@ (defun org-get-heading (&optional no-tags no-todo 
no-priority no-comment)
       (let ((case-fold-search nil))
        (looking-at org-complex-heading-regexp)
         ;; When using `org-fold-core--optimise-for-huge-buffers',
-        ;; returned text may be invisible.  Clear it up.
-        (org-fold-core-remove-optimisation (match-beginning 0) (match-end 0))
+        ;; returned text will be invisible.  Clear it up.
+        (save-match-data
+          (org-fold-core-remove-optimisation (match-beginning 0) (match-end 
0)))
         (let ((todo (and (not no-todo) (match-string 2)))
              (priority (and (not no-priority) (match-string 3)))
              (headline (pcase (match-string 4)
-- 
2.35.1



-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong 
University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg



reply via email to

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