In elisp, how can I tell whether the org heading under point is a leaf node or whether it has child headings? I've found org-list-has-child-p, but I'm having trouble delivering the struct to the function.

  • the outline-level function may be of use: (< (funcall outline-level) (save-excursion (outline-next-heading) (funcall outline-level))).
    – mutbuerger
    Apr 29, 2015 at 19:23

1 Answer 1


You could try org-goto-first-child (inside save-excursion, so you don't actually move the point) and see if it returned nil:

(defun my-org-has-child-p ()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.