From 7de8b3917c391c037f18d13884b5db7474b648b5 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Tue, 30 Jan 2024 15:22:45 +0100 Subject: [PATCH] org-todo: Fix tag alignment when title contains a folded link * lisp/org.el (org-todo): When title contains link, we cannot use `org-fold-region' to unfold everything - this may cause unexpected tag alignment when the link is revealed and font-locking is not yet triggered. Instead of unfolding everything, just remove outline folds. Reported-by: Peter Solodov Link: https://orgmode.org/list/413C89C3-25DB-425B-A367-FA683E7ADD05@gmail.com --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index c90fb6d4b..57de52f9b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9335,7 +9335,7 @@ When called through ELisp, arg is also interpreted in the following way: (unless (org-invisible-p (line-beginning-position)) (org-fold-region (line-beginning-position) (line-end-position) - nil))) + nil 'outline))) (cond ((and org-state (equal this org-state)) (message "TODO state was already %s" (org-trim next))) ((not (pos-visible-in-window-p hl-pos))