On 2024-03-16, 08:56 +0000, Ihor Radchenko wrote: > Bruno Cardoso writes: > > What if you try the following version of `org-activate-folds'? > > (defun org-activate-folds (limit) > "Arrange trailing newlines after folds to inherit face before the fold." > (let ((next-unfolded-newline (search-forward "\n" limit 'move))) > (while (and next-unfolded-newline (org-fold-folded-p) (not (eobp))) > (goto-char (org-fold-core-next-visibility-change nil limit 'only-folds)) > (setq next-unfolded-newline (search-forward "\n" limit 'move))) > (when next-unfolded-newline > (org-with-wide-buffer > (when (and (> (match-beginning 0) (point-min)) > (org-fold-folded-p (1- (match-beginning 0))) > (not (org-fold-folded-p (1- (match-beginning 0)) 'org-link))) > (put-text-property > (match-beginning 0) (match-end 0) > 'face > (get-text-property > (org-fold-previous-visibility-change > (1- (match-beginning 0))) > 'face))) > t)))) > It makes almost no difference.