From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: [Bug] marking repeating task done destroys property/logbook drawers Date: Mon, 03 Mar 2014 22:23:17 -0600 Message-ID: <87mwh6618q.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKgtC-00011k-RG for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 23:23:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKgt1-0003aj-Fi for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 23:23:34 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:33812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKgt1-0003aR-7Q for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 23:23:23 -0500 Received: from archeee (unknown [50.172.132.15]) by mail.messagingengine.com (Postfix) with ESMTPA id E2E1AC007AD for ; Mon, 3 Mar 2014 23:23:17 -0500 (EST) 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: org-mode Mailing List --=-=-= Content-Type: text/plain When I mark a repeating task done (with the settings in the minimal.el file below), org mangles the :LOGBOOK: and :PROPERTY: drawers when trying to insert a :LAST_REPEAT: property. Here are the steps to reproduce consistently: 1. emacs -Q -l ~/minimal.el where minimal.el contains... --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=minimal.el Content-Transfer-Encoding: quoted-printable (add-to-list 'load-path "~/org-mode/lisp") (setq org-log-done 'time) (setq org-log-repeat 'time) (setq org-log-into-drawer t) (setq org-todo-repeat-to-state "TODO") --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 2. Open an org-file containing the following entry. --8<---------------cut here---------------start------------->8--- * TODO Repeating task SCHEDULED: <2014-03-02 Sun .+2w> :LOGBOOK: - State "DONE" from "NOW" [2014-02-23 Sun 08:39] CLOCK: [2014-02-23 Sun 08:26]--[2014-02-23 Sun 08:39] =3D> 0:13 - State "DONE" from "STARTED" [2014-01-28 Tue 20:17] :END: :PROPERTIES: :LAST_REPEAT: [2014-02-23 Sun 08:39] :END: --8<---------------cut here---------------end--------------->8--- 3. Mark the item DONE.=20 Voil=C3=A0... note the empty property drawer, the duplicate logbook drawers, and the misplaced :LAST_REPEAT: --8<---------------cut here---------------start------------->8--- * TODO Repeating task SCHEDULED: <2014-03-17 Mon .+2w> :LOGBOOK: - State "DONE" from "TODO" [2014-03-03 Mon 22:11] :END: :LAST_REPEAT: [2014-03-03 Mon 22:11] :LOGBOOK: - State "DONE" from "NOW" [2014-02-23 Sun 08:39] CLOCK: [2014-02-23 Sun 08:26]--[2014-02-23 Sun 08:39] =3D> 0:13 - State "DONE" from "STARTED" [2014-01-28 Tue 20:17] :END: :PROPERTIES: :END: --8<---------------cut here---------------end--------------->8--- I am using... - Emacs version: 24.3.1 - Org-mode version: 8.2.5h ...on Arch Linux. Running edebug suggested that org-entry-put (which is invoked by org-auto-repeat-maybe) places the :LAST_REPEAT: in the wrong place. However, I couldn't discern why, since invocations of org-entry-put otherwise seem to work fine. Thanks, Matt --=-=-=--