orgzly / orgzly-android

Outliner for taking notes and managing to-do lists
https://www.orgzly.com
GNU General Public License v3.0
2.7k stars 305 forks source link

Limit "++" advances to next repeat only #888

Open zentiggr opened 3 years ago

zentiggr commented 3 years ago

Currently "++" will move a repeat item to the next future timestamp. If it is marked done again, it will move to the next timestamp further in the future.

I would like "++" to move only to the next future timestamp, and on further done cycles, not move any further forward than the next future time.

For example, i pay a bill monthly, it's due on the 17th. I want to set that deadline as 'yyyy-mm-17 19:00 ++1m' and set the scheduled date to 'yyyy-mm-01 +1d'. I could then see a reminder each day, mark it done if needed to, and have the deadline stay at the next due date until i reach that date, and only then would the deadline update to the next monthly date.

zentiggr commented 3 years ago

I believe I've done this before in my own fork by changing the advance logic from:

do { move ts forward } while (ts < now)

to:

while (ts < now) { move ts forward }

7ocb commented 3 years ago

@zentiggr I think that this behavior is modeled after original behavior in Emacs:

++time-to-future

So, if this is changed, this will cause inconsistend behavior in Emacs and Orgzly.

Have you considered using .+ instead?

Also, for your use case, there is - in the deadlines. You can set deadline to yyyy-mm-17 19:00 ++1m -10d, in this way it will not show until 10 days to deadline (at least in Emacs, I realised that I'm not sure how this will behave in Orgzly!).

zentiggr commented 3 years ago

Unfortunately .+ will not cover this use case. Either the monthly due date would shift to a wrong date, or i would have to take off the monthly repeat to avoid changes if the scheduled date were set with .+.

Could this be an option, via a setting flag?

I have to admit, I'm not seeing a solid use case for ++ in it's original form. When i want things to move to the next future repeat, i never want it to go further in the future than that. I realize i may not be a typical user, or simply have not encountered a usage where that would make sense.

zentiggr commented 3 years ago

Also, the "-" option for the deadline is much less flexible than using a +1d repeat on the scheduled date. It would force the note to be visible every day until done, with no way to hide it if i know i won't do it today.

7ocb commented 3 years ago

@zentiggr not sure about orglzy, but in Emacs I'd solve this with setting "scheduled" too.

I.e. I'll set up pay day as deadline, -5d as warning period and if I know that I'll not pay checks today, I just schedule it to, say, tomorrow:

image

The "scheduled" overrides the "deadline" in showing in the agenda (in Emacs, not sure if it will work same way for your case).

When this event marked as done, it drops "scheduled" completely (if it don't have a repeater!) and shifts deadline:

image

So in this way you'll have a reminder at the time you are close to deadline, but can manage the time you plan to do this.

zentiggr commented 3 years ago

I guess using a manual, instead of repeating, scheduled date wouldn't be a huge adjustment. I like that idea, I'll do that.

Regards, Howard

On Fri, Oct 22, 2021, 01:36 E.L.K. @.***> wrote:

@zentiggr https://github.com/zentiggr not sure about orglzy, but in Emacs I'd solve this with setting "scheduled" too.

I.e. I'll set up pay day as deadline, -5d as warning period and if I know that I'll not pay checks today, I just schedule it to, say, tomorrow:

[image: image] https://user-images.githubusercontent.com/8470556/138404671-a1684e30-599c-43bb-a93a-6a14b37d67f7.png

The "scheduled" overrides the "deadline" in showing in the agenda (in Emacs, not sure if it will work same way for your case).

When this event marked as done, it drops "scheduled" completely (if it don't have a repeater!) and shifts deadline:

[image: image] https://user-images.githubusercontent.com/8470556/138404834-c6f08a3b-6c11-4302-8504-ecdbea866ded.png

So in this way you'll have a reminder at the time you are close to deadline, but can manage the time you plan to do this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/orgzly/orgzly-android/issues/888#issuecomment-949327611, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALNQM6RXC3XN6MISWSLG3TUIEA73ANCNFSM5EARNA5Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ScottFreeCode commented 3 years ago

Emacs does this differently, but, in Emacs I'm not handling it through my phone's UI where I can accidentally hit a button easily enough. In fact I've even had the notification not disappear promptly, hit the "reschedule" button again thinking the first tap didn't take, and then missed the next scheduled instance because it incremented the date an extra time (granted that problem would affect any repeater style, I'm just using it as an example of how the app is more prone to accidental extra increments than Emacs).

There are some rare instances where I want the current behavior, but I'd rather have some kind of explicit means of saying "increment this one more from wherever it is even though it's already in the future" on the occassions where that's what I want.