davraamides / todotxt-mode

MIT License
59 stars 12 forks source link

todotxt-mode.toggleCompletion should not overwrite creation date with completion date #15

Closed buenalabs closed 4 years ago

buenalabs commented 4 years ago

Suppose you created this task the day before:

2020-03-22 update README.md

If you run todotxt-mode.toggleCompletion on it the following day...

This is the expected result:

x 2020-03-23 2020-03-22 update README.md

This is the actual result:

x 2020-03-23 update README.md

The completion date overwrites the task creation date.


For reference, here is the todo.txt format from https://github.com/todotxt/todo.txt: todo.txt format

davraamides commented 4 years ago

Yes, that's a bug. I don't handle creation dates right now. I will look to see if this is an easy fix.

filviu commented 4 years ago

Styling options for the creation date would be cool as well.

davraamides commented 4 years ago

Do you just mean they would all be styled the same way, just like other fields are such as project and tag? It wouldn't make sense to make them date-specific like due dates since creation (and completion) dates will always be in the past.

On Sun, May 3, 2020 at 10:19 AM Silviu Vulcan notifications@github.com wrote:

Styling options for the creation date would be cool as well.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/davraamides/todotxt-mode/issues/15#issuecomment-623117101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOOZGOSE5XG6LQSZLFP3BDRPV4N5ANCNFSM4LRIB5UQ .

filviu commented 4 years ago

Yes, I'm thinking all the same way like project and tag - my specific use case is that I'd like to make them less obvious. Maybe a separation by age could be interesting to some (like tasks added last week, last month) but personally I only would use all in one color.

davraamides commented 4 years ago

Release 1.4.15 adds proper support for creation dates (I.e. they will not be overwritten when the toggleCompletion command is applied). It also adds a new style to control highlighting of creation dates.