|
@@ -929,6 +929,11 @@ This function is intended to be used as :fragile property of
|
|
|
(beginning-of-line)
|
|
|
;; Make sure that headline is not partially hidden
|
|
|
(unless (org-fold-folded-p nil 'headline) (org-fold-region (max (point-min) (1- (point))) (line-end-position) nil 'headline))
|
|
|
+ ;; Never hide level 1 headlines
|
|
|
+ (save-excursion
|
|
|
+ (goto-char (line-end-position))
|
|
|
+ (when (re-search-forward (rx bol "* ") (cdr region) t)
|
|
|
+ (org-fold-region (match-beginning 0) (line-end-position) nil 'headline)))
|
|
|
;; Check the validity of headline
|
|
|
(unless (let ((case-fold-search t))
|
|
|
(looking-at (rx-to-string `(or (regex ,(org-item-re))
|