Hi Rainer, Rainer Stengele <rainer.steng...@online.de> writes:
> why does the function fire in this case: > > ***** test > ****** TODO task > SCHEDULED: <2012-04-10 Di> Because it was buggy -- here is a better version (also updated on Worg) (defun org-check-misformatted-subtree () "Check misformatted entries in the current buffer." (interactive) (show-all) (org-map-entries (lambda () (when (and (move-beginning-of-line 2) (not (looking-at org-heading-regexp))) (if (or (and (org-get-scheduled-time (point)) (not (looking-at (concat "^.*" org-scheduled-regexp)))) (and (org-get-deadline-time (point)) (not (looking-at (concat "^.*" org-deadline-regexp))))) (when (y-or-n-p "Fix this subtree? ") (message "Call the function again when you're done fixing this subtree.") (recursive-edit)) (message "All subtrees checked.")))))) Thanks for testing! -- Bastien