* lisp/ox.el (org-export-excluded-from-toc-p): New function. * testing/lisp/test-ox.el (test-org-export/excluded-from-toc-p): New test.