From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: Bug: "SCHEDULED: " positioning is fragile [7.8.06 (release_7.8.06.181.ga481)] Date: Tue, 10 Apr 2012 15:43:22 +0200 Message-ID: <4F8438FA.4030306@online.de> References: <871uo1l37g.fsf@gnu.org> <877gxpyxs6.fsf@gnu.org> <878vi5xe7p.fsf@gnu.org> <87aa2lufe8.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHbM7-00032Y-KU for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 09:43:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHbM4-00047Z-T6 for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 09:43:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:43407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHbM4-00047D-Ly for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 09:43:32 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SHbM2-0006M1-Qi for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 15:43:30 +0200 Received: from 212.34.176.74 ([212.34.176.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Apr 2012 15:43:30 +0200 Received: from rainer.stengele by 212.34.176.74 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Apr 2012 15:43:30 +0200 In-Reply-To: <87aa2lufe8.fsf@altern.org> 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 Cc: Dave Abrahams , emacs-orgmode@gnu.org, John Wiegley Am 09.04.2012 16:51, schrieb Bastien: > Hi Dave, > > Dave Abrahams writes: > >> Sorry, but I don't want to spend the time on that. I'm trying to get >> the rules changed so that it isn't so easy to corrupt an org file. > > The current rule is "Leave SCHEDULED: and DEADLINE: information where > Org's `org-schedule' and `org-deadline' put it." > > Maybe I don't understand how do you want to change this rule. > >> I'm not much interested in building a tool to undo corruption. >> >>> FYI: Nicolas and I have been discussing about the issue you raised, and >>> the integration of org-element.el will force us to be clearer about such >>> cases, which is good. >> >> I sincerely hope that when you become clearer about such cases you pick >> a liberal set of rules that isn't so error-prone. The ideas that I >> can't just hit return after a headline and start typing a body, and that >> I'll be nagged about misplaced SCHEDULED: lines, are both very >> unappealing. > > I have just added this hack: > > "Check for misplaced SCHEDULED and DEADLINE cookies" > http://orgmode.org/worg/org-hacks.html#sec-1-2-8 > > Here is the function: > > (defun org-check-misformatted-subtree () > "Check misformatted entries in the current buffer." > (interactive) > (show-all) > (org-map-entries > (lambda () > (move-beginning-of-line 2) > (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."))))) > > HTH, > Bastien, why does the function fire in this case: ***** test ****** TODO task SCHEDULED: <2012-04-10 Di> Did I misunderstand? Rainer