I’m trying to add a test (which should fail at the moment, representing an org-mode bug), but it seems like each ‘should’ form is actually nondeterministic. The first form returns nil on the first eval and t on subsequent evals, its behavior resetting upon any command, and the second form does the inverse, returning t on the first eval and nil on subsequent evals.
Is this behavior expected? (ert-deftest test-org/org-next-visible-heading () (should (org-test-with-temp-text "* A\n** B\n\n\n* C" (org-overview) (org-cycle) (org-cycle) (org-next-visible-heading 1) (and (bolp) (org-at-heading-p)))) (should (org-test-with-temp-text "* A\n** B\n\n\n* C" (org-overview) (org-cycle) (org-cycle) (org-cycle) (org-next-visible-heading 1) (and (bolp) (org-at-heading-p)))))