1. emacs -Q
2. insert ";;; heading"
3. M-: (outline-on-heading-p)
=> t
4. C-a
5. M-: (put-text-property (point) (1+ (point)) 'invisible 'foo)
6. M-; (outline-on-heading-p)
=> nil
Expected results:
(outline-on-heading-p)
=> t
Actual results:
(outline-on-heading-p)
=> nil
This shows the relation between outline-on-heading-p and outline-invisible-p:
(defun outline-on-heading-p (&optional invisible-ok)
"Return t if point is on a (visible) heading line.
If INVISIBLE-OK is non-nil, an invisible heading line is ok too."
(save-excursion
(beginning-of-line)
(and (bolp) (or invisible-ok (not (outline-invisible-p)))
(looking-at outline-regexp))))
Basically the expectation is that a outline heading be not marked as "invisible" by any 'foo invisible property. Outline headings should be marked invisible by only 'outline invisible property.
Also as the function is prefixed with "outline-", that kind of makes sense.
On the other hand, in org, we need a function that returns non-nil for *any* invisible property. So that commit breaks org's expectation.
This looks fine,
Thanks.
but I'd rather revert the faulty Emacs commit if
it is not necessary.
Until Paul enlighten us, I'll have a deeper look.
After reviewing debbugs 24073, the commit looks correct for emacs master and outline package. WDYT?