From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Bug: "SCHEDULED: " positioning is fragile [7.8.06 (release_7.8.06.181.ga481)] Date: Tue, 10 Apr 2012 16:12:58 +0200 Message-ID: <87r4vvpted.fsf@gnu.org> References: <871uo1l37g.fsf@gnu.org> <877gxpyxs6.fsf@gnu.org> <878vi5xe7p.fsf@gnu.org> <87aa2lufe8.fsf@altern.org> <4F8438FA.4030306@online.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHbnS-0003CO-G3 for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 10:11:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHbnL-0005Ny-Cu for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 10:11:50 -0400 Received: from incoming2.cnam.fr ([163.173.128.34]:10144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHbnL-0005Nj-71 for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 10:11:43 -0400 In-Reply-To: <4F8438FA.4030306@online.de> (Rainer Stengele's message of "Tue, 10 Apr 2012 15:43:22 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer Stengele Cc: Dave Abrahams , emacs-orgmode@gnu.org, John Wiegley Hi Rainer, Rainer Stengele 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