all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: cesar mena <cesar.mena@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: please read: bug when marking tasks done
Date: Mon, 07 Jan 2019 09:52:13 -0500	[thread overview]
Message-ID: <8736q47c6a.fsf@norang.ca> (raw)
In-Reply-To: <87wonhcpnj.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 07 Jan 2019 00:49:52 +0100")

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> cesar mena <cesar.mena@gmail.com> writes:
>
>> hello everyone,
>>
>> in the maint branch, marking a repeatable task as DONE causes the
>> "Rescheduled from" dates to be lost in the :LOGBOOK:.
>>
>> in the below diff all of the from dates are rewritten with the new
>> scheduled date:
>>
>>   -      SCHEDULED: <2018-12-04 Tue .+1m>
>>   +      SCHEDULED: <2019-02-05 Tue .+1m>
>>          :PROPERTIES:
>>   -      :LAST_REPEAT: [2018-08-08 Wed 07:40]
>>   +      :LAST_REPEAT: [2019-01-05 Sat 18:47]
>>          :END:
>>          :LOGBOOK:
>>   -      - Rescheduled from "[2018-11-28 Wed .+1m]" on [2018-11-28 Wed 08:35]
>>   -      - Rescheduled from "[2018-11-25 Sun .+1m]" on [2018-11-25 Sun 09:17]
>>   -      - Rescheduled from "[2018-11-20 Tue .+1m]" on [2018-11-22 Thu 10:03]
>>   -      - Rescheduled from "[2018-11-13 Tue .+1m]" on [2018-11-17 Sat 09:48]
>>   -      - Rescheduled from "[2018-11-06 Tue .+1m]" on [2018-11-08 Thu 07:02]
>>   -      - Rescheduled from "[2018-10-28 Sun .+1m]" on [2018-10-30 Tue 16:22]
>>   -      - Rescheduled from "[2018-10-25 Thu .+1m]" on [2018-10-25 Thu 07:34]
>>   -      - Rescheduled from "[2018-10-19 Fri .+1m]" on [2018-10-19 Fri 07:48]
>>   -      - Rescheduled from "[2018-10-16 Tue .+1m]" on [2018-10-16 Tue 16:21]
>>   -      - Rescheduled from "[2018-10-11 Thu .+1m]" on [2018-10-14 Sun 10:31]
>>   -      - Rescheduled from "[2018-10-07 Sun .+1m]" on [2018-10-08 Mon 08:48]
>>   -      - Rescheduled from "[2018-09-27 Thu .+1m]" on [2018-09-29 Sat 18:50]
>>   -      - Rescheduled from "[2018-09-20 Thu .+1m]" on [2018-09-20 Thu 09:50]
>>   -      - Rescheduled from "[2018-09-08 Sat .+1m]" on [2018-09-14 Fri 07:10]
>>   +      - State "DONE"       from "TODO"       [2019-01-05 Sat 18:47]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-28 Wed 08:35]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-25 Sun 09:17]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-22 Thu 10:03]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-17 Sat 09:48]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-08 Thu 07:02]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-30 Tue 16:22]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-25 Thu 07:34]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-19 Fri 07:48]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-16 Tue 16:21]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-14 Sun 10:31]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-08 Mon 08:48]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-09-29 Sat 18:50]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-09-20 Thu 09:50]
>>   +      - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-09-14 Fri 07:10]
>>   
>> bisect says it was introduced in
>> af81211fdc01b64449179bcdb77fb1c8ecb3fb94.
>
> Which is a bugfix…
>
> I think a solution would be to remove the repeater from timestamps
> inserted upon logging a state change or a re-scheduling.
>
> However, you would have to fix your old documents manually.
>
> Regards,

Hi Nicholas,

I think this commit is a problem:

  af81211fd (Also obey to repeaters in inactive time stamps, 2018-11-10)

At the beginning of the year I close my repeating tasks with lots of
logging and clocking entries and create a new one as follows:

1) Clone repeating task to new task for next year
2) Unscheduled old task which writes the scheduled repeater to the log
as above
3) Mark old task DONE 

Step 3 fails.  It moves the repeater in the log message from the old
scheduled task makes the task TODO again.

Example:

--------------------------------------------------------------------------------
* TODO Sample repeating task 2018
  SCHEDULED: <2019-01-07 Mon ++1w>
  :LOGBOOK:
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 2
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 1
  :END:
  [2019-01-07 Mon 09:44]

--------------------------------------------------------------------------------

Now clone the task with C-c C-x c 1 RET RET

--------------------------------------------------------------------------------
* TODO Sample repeating task 2018
  SCHEDULED: <2019-01-07 Mon ++1w>
  :LOGBOOK:
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 2
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 1
  :END:
  [2019-01-07 Mon 09:44]

* TODO Sample repeating task 2018
  SCHEDULED: <2019-01-07 Mon ++1w>
  :LOGBOOK:
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 2
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 1
  :END:
  [2019-01-07 Mon 09:44]
--------------------------------------------------------------------------------

Rename the second task to 2019 and unschedule the first task:

--------------------------------------------------------------------------------
* TODO Sample repeating task 2018
  :LOGBOOK:
  - Not scheduled, was "[2019-01-07 Mon ++1w]" on [2019-01-07 Mon 09:47]
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 2
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 1
  :END:
  [2019-01-07 Mon 09:44]

* TODO Sample repeating task 2019
  SCHEDULED: <2019-01-07 Mon ++1w>
  :LOGBOOK:
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 2
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 1
  :END:
  [2019-01-07 Mon 09:44]

--------------------------------------------------------------------------------

And finally Mark the first task DONE

--------------------------------------------------------------------------------
* TODO Sample repeating task 2018
  :PROPERTIES:
  :LAST_REPEAT: [2019-01-07 Mon 09:48]
  :END:
  :LOGBOOK:
  - State "DONE"       from "TODO"       [2019-01-07 Mon 09:48]
  - Not scheduled, was "[2019-01-14 Mon ++1w]" on [2019-01-07 Mon 09:47]
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 2
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 1
  :END:
  [2019-01-07 Mon 09:44]

* TODO Sample repeating task 2019
  SCHEDULED: <2019-01-07 Mon ++1w>
  :LOGBOOK:
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 2
  - Note taken on [2019-01-07 Mon 09:44] \\
    Log note 1
  :END:
  [2019-01-07 Mon 09:44]

--------------------------------------------------------------------------------

The first task should now be DONE not TODO but instead it has updated
the repeater in the log message from unscheduling instead and it's not
possible to mark this task as DONE with C-c C-t anymore.

Should this problem commit be reverted?
  af81211fd (Also obey to repeaters in inactive time stamps, 2018-11-10)

Regards,
Bernt

  reply	other threads:[~2019-01-07 14:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-06  0:13 please read: bug when marking tasks done cesar mena
2019-01-06 23:49 ` Nicolas Goaziou
2019-01-07 14:52   ` Bernt Hansen [this message]
2019-01-07 15:20   ` cesar mena
2019-01-08 10:24     ` Nicolas Goaziou
2019-01-08 14:29       ` Bernt Hansen
2019-01-08 20:07       ` cesar mena
2019-01-09 22:50         ` Nicolas Goaziou
2019-01-10 14:15           ` cesar mena
2019-01-12 11:24             ` Nicolas Goaziou
2019-01-12 14:23               ` cesar mena
2019-01-12 19:37                 ` Samuel Wales
2019-01-12 21:02                   ` Samuel Wales
2019-01-13 15:00                   ` Nicolas Goaziou
2019-01-13 20:16                 ` Nicolas Goaziou
2019-01-13 21:52                   ` Samuel Wales
2019-01-15 14:24                     ` Bernt Hansen
2019-01-15 16:43                   ` cesar mena
2019-01-15 23:11                     ` Samuel Wales
2019-01-15 23:18                       ` Samuel Wales
2019-01-27 21:08                       ` Nicolas Goaziou
2019-01-29 14:58                         ` Robert Horn
2019-01-30 12:22                         ` cesar mena
2019-01-30 21:52                           ` Nicolas Goaziou
2019-01-31 10:25                             ` cesar mena
2019-01-31 23:17                               ` Samuel Wales

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

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

  git send-email \
    --in-reply-to=8736q47c6a.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=cesar.mena@gmail.com \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.