From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Abrahams Subject: Re: Bug: "SCHEDULED: " positioning is fragile [7.8.06 (release_7.8.06.181.ga481)] Date: Mon, 09 Apr 2012 10:54:23 -0400 Message-ID: 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 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHFzC-00072k-An for emacs-orgmode@gnu.org; Mon, 09 Apr 2012 10:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHFzA-0007eM-DC for emacs-orgmode@gnu.org; Mon, 09 Apr 2012 10:54:29 -0400 Received: from mail-qa0-f41.google.com ([209.85.216.41]:54099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHFzA-0007dx-9S for emacs-orgmode@gnu.org; Mon, 09 Apr 2012 10:54:28 -0400 Received: by qafl39 with SMTP id l39so1947062qaf.14 for ; Mon, 09 Apr 2012 07:54:25 -0700 (PDT) In-Reply-To: <87aa2lufe8.fsf@altern.org> (Bastien's message of "Mon, 09 Apr 2012 16:51:59 +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: Bastien Cc: emacs-orgmode@gnu.org, John Wiegley on Mon Apr 09 2012, Bastien wrote: > 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 want the rule to be that you can have as much body text as you want between the headline and the SCHEDULED: line. Or failing that, I'd like org's default keybindings to make it really hard to insert text between the headline and SCHEDULED:. Any typing in that area should, by default, force the point to jump after SCHEDULED: >> 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."))))) Thanks, I think... but I can't tell if everybody is missing my point. I've been trying to argue for something that doesn't allow mistakes to happen in the first place. -- Dave Abrahams BoostPro Computing http://www.boostpro.com