|
@@ -17260,7 +17260,7 @@ number of stars to add."
|
|
|
;; Case 1. Started at an heading: de-star headings.
|
|
|
((org-at-heading-p)
|
|
|
(while (< (point) end)
|
|
|
- (when (org-at-heading-p t)
|
|
|
+ (when (org-at-heading-p)
|
|
|
(looking-at org-outline-regexp) (replace-match "")
|
|
|
(setq toggled t))
|
|
|
(forward-line)))
|
|
@@ -17862,7 +17862,7 @@ and :keyword."
|
|
|
(p (point)) clist o)
|
|
|
;; First the large context
|
|
|
(cond
|
|
|
- ((org-at-heading-p t)
|
|
|
+ ((org-at-heading-p)
|
|
|
(push (list :headline (point-at-bol) (point-at-eol)) clist)
|
|
|
(when (progn
|
|
|
(beginning-of-line 1)
|
|
@@ -19612,9 +19612,13 @@ Respect narrowing."
|
|
|
(end-of-line)
|
|
|
(null (re-search-backward org-outline-regexp-bol nil t))))))
|
|
|
|
|
|
-(defun org-at-heading-p (&optional _)
|
|
|
- "Non-nil when on a headline."
|
|
|
- (outline-on-heading-p t))
|
|
|
+(defun org-at-heading-p (&optional invisible-not-ok)
|
|
|
+ "Return t if point is on a (possibly invisible) heading line.
|
|
|
+If INVISIBLE-NOT-OK is non-nil, an invisible heading line is not ok."
|
|
|
+ (save-excursion
|
|
|
+ (beginning-of-line)
|
|
|
+ (and (bolp) (or (not invisible-not-ok) (not (org-fold-folded-p)))
|
|
|
+ (looking-at outline-regexp))))
|
|
|
|
|
|
(defun org-in-commented-heading-p (&optional no-inheritance element)
|
|
|
"Non-nil if point is under a commented heading.
|