Morgan Smith <[email protected]> writes:
>> The new code will throw an error when point is not on heading, unlike
>> the old code.
>
> Darn.  I tried my best to ensure the API switchover didn't change behavior.
>
> I had foolishly assumed that "(org-is-habit-p (point))" would error when
> not on a heading.  I was wrong.
>
> I've attached a patch that fixes the issue.  Let me know what you think.
> ...
> +  (let ((todo (org-element-at-point (or epom 
> (org-entry-beginning-position)))))

This defeats the point of using element API. You can just use 
org-element-lineage.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to