emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: org-mode Mailing List <emacs-orgmode@gnu.org>
Subject: [Bug] marking repeating task done destroys property/logbook drawers
Date: Mon, 03 Mar 2014 22:23:17 -0600	[thread overview]
Message-ID: <87mwh6618q.fsf@fastmail.fm> (raw)

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

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...


[-- Attachment #2: minimal.el --]
[-- Type: application/emacs-lisp, Size: 174 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1586 bytes --]


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] =>  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. 

Voilà... 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] =>  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



             reply	other threads:[~2014-03-04  4:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04  4:23 Matt Lundin [this message]
2014-03-08  9:27 ` [Bug] marking repeating task done destroys property/logbook drawers Karl Voit
2014-03-13 16:16 ` Bastien
2014-03-13 17:47   ` Matt Lundin
2014-03-13 18:05     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mwh6618q.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).