From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Jones Subject: [PATCH] Re: Insert LOGBOOK drawer removes indendation of first line under headline Date: Fri, 20 Mar 2009 16:25:05 -0600 Message-ID: References: <20090320211753.GA4890@thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lkn9Y-0008AD-94 for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 18:25:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lkn9T-00088h-6i for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 18:25:23 -0400 Received: from [199.232.76.173] (port=42949 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lkn9S-00088b-LR for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 18:25:18 -0400 Received: from main.gmane.org ([80.91.229.2]:54956 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lkn9S-0006h6-05 for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 18:25:18 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Lkn9Q-0002wE-Uq for emacs-orgmode@gnu.org; Fri, 20 Mar 2009 22:25:16 +0000 Received: from c-67-177-235-141.hsd1.co.comcast.net ([67.177.235.141]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Mar 2009 22:25:16 +0000 Received: from mlists by c-67-177-235-141.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Mar 2009 22:25:16 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org David Maus writes: > When I start to clock a headline (C-c C-x C-i) that does not have a > LOGBOOK drawer orgmode inserts one but removes the indentation of the > first line below the headline: This patch fixes your problem. Sorry about that. diff --git a/lisp/org-clock.el b/lisp/org-clock.el index c79a6af..8d2279a 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -444,13 +444,13 @@ the clocking selection, associated with the letter `d'." (stringp org-clock-into-drawer) (and (integerp org-clock-into-drawer) (< org-clock-into-drawer 2))) - (org-indent-line-function) (insert ":" drawer ":\n:END:\n") - (beginning-of-line 0) - (org-indent-line-function) - (beginning-of-line 0) + (beginning-of-line -1) + (org-indent-line-function) (org-flag-drawer t) - (beginning-of-line 2) + (beginning-of-line 2) + (org-indent-line-function) + (beginning-of-line) (or org-log-states-order-reversed (and (re-search-forward org-property-end-re nil t) (goto-char (match-beginning 0)))))))) -- Peter Jones, http://pmade.com pmade inc. Louisville, CO US