From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Re: [ANN] org-conflict add-on: timing conflicts detector and resolver for Org agenda Date: Sun, 9 Jun 2019 15:18:34 +0300 Message-ID: References: <23718.24027.215006.427898@AGAME7.local> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000093f859058ae311f7" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38894) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZwmw-0007YN-4g for emacs-orgmode@gnu.org; Sun, 09 Jun 2019 08:19:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZwmt-0000hZ-Am for emacs-orgmode@gnu.org; Sun, 09 Jun 2019 08:19:06 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:38362) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZwms-0000gG-QX for emacs-orgmode@gnu.org; Sun, 09 Jun 2019 08:19:03 -0400 Received: by mail-lf1-x12c.google.com with SMTP id b11so4731262lfa.5 for ; Sun, 09 Jun 2019 05:19:02 -0700 (PDT) In-Reply-To: <23718.24027.215006.427898@AGAME7.local> 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" To: Thomas Plass Cc: emacs-orgmode --00000000000093f859058ae311f7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I'm surprised that noone answered yet. This package is great! You're addressing one of the large shortcomings of org-mode's planning features: org has information about several planning details (estimation, duration, holidays, start date, deadline, =E2=80=A6) a= nd still doesn't use any of that to offer help to the user in very simple cases. Like for instance, I would expect org-mode to say =E2=80=9Eyou shouldn't = have >20 tasks scheduled for the same day, because at a default duration of 1 h, you'll find that there aren't enough working hours to do them=E2=80=9C. Or = if you have a 10-hour task and a 12-hour task in the same day, it should trigger some warning. Or scheduling a work task during a holiday. Or conflicts. Or work which is scheduled after a deadline. Or 10 tasks scheduled one after the other without taking into account that humans need to take breaks from time to time. Or schedules based on out-of-date information like overrun deadlines or overrun budgets. I want the freedom to be able to do all those mistakes but I'd also appreciate some help from org-mode or any other tool= =E2=80=A6 Scheduling algorithms are very hard. Repetitions, time zones, summer time changes, =E2=80=A6 As for org-conflict itself: I like how it has not only the part about detecting conflicts, but also an interface to see conflicting items, propose a solution and try to find the right time; that's many steps ahead. I would be fine with just being able to *detect* conflicts, but I see how detecting+resolving can be useful to many people. I like how you included the part about having breathing time or =E2=80=9Eco= ffee breaks=E2=80=9C between tasks. This is all very user-friendly. I'm not sure about the entry point; that is, how to invoke the conflict resolution step. From the documentation and from using it, it seems that you must actively say =E2=80=9Eright now I'd like to write a date to see wh= ether it would conflict with anything=E2=80=9C; this is a use case I never have thou= ght of or needed previously. My needs have rather been: 1) =E2=80=9Eright now I'd like to schedule a task=E2=80=9C (hopefully a= t a date which doesn't create conflicts). That means, I'd prefer if the conflict resolution happened as part of the normal C-c C-s scheduling process, instead of an optional step that you must remember to invoke with C-c C-c. Reschedulings (including rescheduling after a repetition) should be subject to the same checks. Even if this means having to wait more. I think you could provide some code or instructions about how to make automatic checks after C-c C-s (maybe only if the specified date includes a duration) 2) from time to time I wish I could check not only 1 timestamp, but *all* my existing appointments (mainly the future ones) for conflicts. This means comparing each one against each other! (including repetitions) or producing a timeline and checking for overlaps. This is very hard, I know! And the interactive part (seeing proposed resolutions) is heavy because there are infinite possible resolutions. This turns very fast into an optimization problem An issue that makes org-conflict less helpful than it could is that it only works for agenda appointments that have a duration. You implemented a default duration for the *new* event (the one just inputted) and then compare this event against all existing agenda events *that have a duration= *. But I think that *all* agenda events should have a default duration too (because in real life, no task takes 0 minutes). So the new event should be compared against all future timestamps, not only those with a duration. This is slower, I know. Actually, a better way to implement this would be: let's forget about durations and just take the day, not the hour. If you want to schedule an event at day X, and there's already another event at day X (no duration specified), let's call this a conflict and prevent scheduling a second one. If you don't want to consider it a conflict (because you really plan to do both things the same day) then you should be required to choose a time for the existing event, and then another time (non-conflicting) for the new event. This experiment may help in teaching the user to do better planning, i.e. if you want to do many things the same day, choose at which times. I tried to implement some programs to do similar things, and to get some useful information from my org agenda (which is a mess because of too many tasks). Like for instance, I take a list of tasks, =E2=80=9Eenhance them=E2= =80=9C with scheduling information like a default duration and a deadline, and then I add the human requirements that org doesn't know about: for instance complaining if there are more than 24 h of work in a day (actually I delay them to the next day), or adding pauses for lunch or for sleep (this will also shift everything forwards). This is all more complex than expected and in the end I'm doing the processing outside org; actually I prefer to use a very simple list (1. xxxxx, 2. yyyyyy, 3. zzzz, =E2=80=A6) in an org file t= o do my planning, and ignore org-mode tasks, since org scheduling isn't helpful yet= . My ideal goal would be to tell org =E2=80=9Etake *all* open tasks in my fil= es and auto-schedule them *well*, that means: consider that each one will take some time (even if it doesn't specify a duration) and will start at some date (even if it isn't scheduled yet), put one after the other, leave short resting pauses between tasks, don't schedule tasks during lunch and dinner and sleep time, don't schedule tasks during holidays, don't schedule tasks at times when there's a known appointment=E2=80=9C. This is just the starti= ng point! To do this *very well*, it would also have to schedule tasks according to their priority (e.g. the more important ones first), according to their deadline (do tasks before deadline, not after), according to habits description (habits must be regular), according to performance information (e.g. time-overrun tasks must be dealt with earlier), etc. All this is an attempt to model common sense! I realize that org-mode might not be the right tool (yet). I don't expect it to define all decision rules and run optimization algorithms (simulated annealing, etc.) for minutes to find the best schedule. However, I still want that. Do you know any external program that can process all scheduling information (ideally, from org) and produce a good schedule according to common-sense rules? (i.e. no more than 24 hour per day, no conflicts, etc.) Some of the topics above can be described very well with =E2=80=9Econstrain= t programming=E2=80=9C. Like with minizinc and ot= hers, with which producing conflict-free schedules should be easy. Now who can integrate org-mode scheduling with minizinc=E2=80=A6? Or with a= logic programming framework in Emacs Lisp like reazon =E2=80=A6 More about org-conflict: it's a useful tool and it's very well written, with documentation and explanations. You could put that in some repository to make it easy to track changes or to know about the latest version. Thanks (for the idea, the interest, the code, the documentation, =E2=80=A6)= ! On Thu, Apr 4, 2019 at 10:41 PM Thomas Plass wrote: > With this post, I'd like to submit org-conflict, a new Org add-on, to > the community for enjoyment, scrutiny and feedback. > > Org-conflict aims to help Org agenda users prevent creating scheduling > conflicts. If you use the agenda for calendar purposes, you might > benefit from validating timestamps before you commit them. > > My own demand for conflict-free timestamps arose from using Org as the > back end of an iCalendar client I created for VM which exports Org > entries. Most people who send me meeting requests use MS Outlook and > I got envious when I saw that Outlook informs them immediately of any > scheduling conflict when it processes incoming iCalendar data. > Initially, org-conflict was intended just as a Lisp predicate called > from the VM presentation buffer. Adding an interactive mode, so that > it could be used on regular Org timestamps, was fairly easy. Having > then added conflict resolution, I thought this might have enough > functionality to count as an Org add-on. > > So here it is as the attached org-conflict.el, tested with Org 9.0 and > 9.2. Its implementation is "pure Org" and relies only on code that is > loaded anyway when Org is running. > > Instead of posting a longish message to this list, I opted to explain > org-conflict in the attached FAQ document, of course a .org file. The > added benefit being that the document is a self-contained demo. > Following the guided tour, you know after a couple of minutes > interaction if this package is for you. > > If this is all tl;dr, here's org-conflict in brief: > > - compares a test time/timestamp/-range against 'org-agenda-files. > Eligible timestamps in there are event-type, ie. contain a > time-of-day and encode a duration > > - detects overlaps ("conflicts"), computes a resolution > > - supports intervals between events ("coffee breaks") > > - supports virtual ranges (end time is before start time) > > - customizable levels of automation > > - designed to be put on the C-c C-c hook, makes timestamps magic > > - dedicated interactive and non-interactive modes > > Please let me know if this package is remotely useful, completely > misses the point or has crippling bugs and oversights. > > Regards, > > Thomas > > --00000000000093f859058ae311f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
=C2=A0 I'm surprised that noone answered yet.<= /div>
=C2=A0 This package is great! You're addressing one of the la= rge shortcomings of org-mode's planning features: org has information a= bout several planning details (estimation, duration, holidays, start date, = deadline, =E2=80=A6) and still doesn't use any of that to offer help to= the user in very simple cases.
=C2=A0 Like for instance, I would= expect org-mode to say =E2=80=9Eyou shouldn't have >20 tasks schedu= led for the same day, because at a default duration of 1 h, you'll find= that there aren't enough working hours to do them=E2=80=9C. Or if you = have a 10-hour task and a 12-hour task in the same day, it should trigger s= ome warning. Or scheduling a work task during a holiday. Or conflicts. Or w= ork which is scheduled after a deadline. Or 10 tasks scheduled one after th= e other without taking into account that humans need to take breaks from ti= me to time. Or schedules based on out-of-date information like overrun dead= lines or overrun budgets. I want the freedom to be able to do all those mis= takes but I'd also appreciate some help from org-mode or any other tool= =E2=80=A6
=C2=A0 Scheduling algorithms are very hard. Repetitions= , time zones, summer time changes, =E2=80=A6

=C2= =A0 As for org-conflict itself:

I like how it has = not only the part about detecting conflicts, but also an interface to see c= onflicting items, propose a solution and try to find the right time; that&#= 39;s many steps ahead. I would be fine with just being able to detect conflicts, but I see how detecting+resolving can be useful to many people= .
I like how you included the part about having breathing time or= =E2=80=9Ecoffee breaks=E2=80=9C between tasks. This is all very user-frien= dly.

I'm not sure about the entry point; that = is, how to invoke the conflict resolution step. From the documentation and = from using it, it seems that you must actively say =E2=80=9Eright now I'= ;d like to write a date to see whether it would conflict with anything=E2= =80=9C; this is a use case I never have thought of or needed previously. My= needs have rather been:
=C2=A0 =C2=A0 1) =E2=80=9Eright now I= 9;d like to schedule a task=E2=80=9C (hopefully at a date which doesn't= create conflicts). That means, I'd prefer if the conflict resolution h= appened as part of the normal C-c C-s scheduling process, instead of an opt= ional step that you must remember to invoke with C-c C-c. Reschedulings (in= cluding rescheduling after a repetition) should be subject to the same chec= ks. Even if this means having to wait more. I think you could provide some = code or instructions about how to make automatic checks after C-c C-s (mayb= e only if the specified date includes a duration)
=C2=A0 =C2=A0 2= ) from time to time I wish I could check not only 1 timestamp, but=C2=A0= all my existing appointments (mainly the future ones) for conflicts. Th= is means comparing each one against each other! (including repetitions) or = producing a timeline and checking for overlaps. This is very hard, I know! = And the interactive part (seeing proposed resolutions) is heavy because the= re are infinite possible resolutions. This turns very fast into an optimiza= tion problem=C2=A0

An issue that makes org-conflic= t less helpful than it could is that it only works for agenda appointments = that have a duration. You implemented a default duration for the new= event (the one just inputted) and then compare this event against all exis= ting agenda events=C2=A0that have a duration. But I think that al= l agenda events should have a default duration too (because in real lif= e, no task takes 0 minutes). So the new event should be compared against al= l future timestamps, not only those with a duration. This is slower, I know= .
Actually, a better way to implement this would be: let's fo= rget about durations and just take the day, not the hour. If you want to sc= hedule an event at day X, and there's already another event at day X (n= o duration specified), let's call this a conflict and prevent schedulin= g a second one. If you don't want to consider it a conflict (because yo= u really plan to do both things the same day) then you should be required t= o choose a time for the existing event, and then another time (non-conflict= ing) for the new event. This experiment may help in teaching the user to do= better planning, i.e. if you want to do many things the same day, choose a= t which times.

=C2=A0=C2=A0
I tried to i= mplement some programs to do similar things, and to get some useful informa= tion from my org agenda (which is a mess because of too many tasks). Like f= or instance, I take a list of tasks, =E2=80=9Eenhance them=E2=80=9C with sc= heduling information like a default duration and a deadline, and then I add= the human requirements that org doesn't know about: for instance compl= aining if there are more than 24 h of work in a day (actually I delay them = to the next day), or adding pauses for lunch or for sleep (this will also s= hift everything forwards). This is all more complex than expected and in th= e end I'm doing the processing outside org; actually I prefer to use a = very simple list (1. xxxxx, 2. yyyyyy, 3. zzzz, =E2=80=A6) in an org file t= o do my planning, and ignore org-mode tasks, since org scheduling isn't= helpful yet.
My ideal goal would be to tell org =E2=80=9Etake all open tasks in my files and auto-schedule them well, that me= ans: consider that each one will take some time (even if it doesn't spe= cify a duration) and will start at some date (even if it isn't schedule= d yet), put one after the other, leave short resting pauses between tasks, = don't schedule tasks during lunch and dinner and sleep time, don't = schedule tasks during holidays, don't schedule tasks at times when ther= e's a known appointment=E2=80=9C. This is just the starting point! To d= o this very well, it would also have to schedule tasks according to = their priority (e.g. the more important ones first), according to their dea= dline (do tasks before deadline, not after), according to habits descriptio= n (habits must be regular), according to performance information (e.g. time= -overrun tasks must be dealt with earlier), etc. All this is an attempt to = model common sense!

I realize that org-mode might = not be the right tool (yet). I don't expect it to define all decision r= ules and run optimization algorithms (simulated annealing, etc.) for minute= s to find the best schedule. However, I still want that.
Do you k= now any external program that can process all scheduling information (ideal= ly, from org) and produce a good schedule according to common-sense rules? = (i.e. no more than 24 hour per day, no conflicts, etc.)

Some of the topics above can be described very well with =E2=80=9Econ= straint programming=E2=80=9C. Like with=C2=A0minizinc=C2=A0and others, with which producing conflict-free sc= hedules should be easy.
Now who can integrate org-mode scheduling= with minizinc=E2=80=A6? Or with a logic programming framework in Emacs Lis= p like=C2=A0reazon=E2= =80=A6


More about org-conflict: it&= #39;s a useful tool and it's very well written, with documentation and = explanations. You could put that in some repository to make it easy to trac= k changes or to know about the latest version.

Tha= nks (for the idea, the interest, the code, the documentation, =E2=80=A6)!


On Thu, Apr 4, 2019 at 10:41 PM Thomas Plass <thunk2@arcor.de> wrote:
With this post, I'd like to = submit org-conflict, a new Org add-on, to
the community for enjoyment, scrutiny and feedback.

Org-conflict aims to help Org agenda users prevent creating scheduling
conflicts.=C2=A0 If you use the agenda for calendar purposes, you might
benefit from validating timestamps before you commit them.

My own demand for conflict-free timestamps arose from using Org as the
back end of an iCalendar client I created for VM which exports Org
entries.=C2=A0 Most people who send me meeting requests use MS Outlook and<= br> I got envious when I saw that Outlook informs them immediately of any
scheduling conflict when it processes incoming iCalendar data.
Initially, org-conflict was intended just as a Lisp predicate called
from the VM presentation buffer.=C2=A0 Adding an interactive mode, so that<= br> it could be used on regular Org timestamps, was fairly easy.=C2=A0 Having then added conflict resolution, I thought this might have enough
functionality to count as an Org add-on.

So here it is as the attached org-conflict.el, tested with Org 9.0 and
9.2.=C2=A0 Its implementation is "pure Org" and relies only on co= de that is
loaded anyway when Org is running.

Instead of posting a longish message to this list, I opted to explain
org-conflict in the attached FAQ document, of course a .org file.=C2=A0 The=
added benefit being that the document is a self-contained demo.
Following the guided tour, you know after a couple of minutes
interaction if this package is for you.

If this is all tl;dr, here's org-conflict in brief:

=C2=A0- compares a test time/timestamp/-range against 'org-agenda-files= .
=C2=A0 =C2=A0Eligible timestamps in there are event-type, ie. contain a
=C2=A0 =C2=A0time-of-day and encode a duration

=C2=A0- detects overlaps ("conflicts"), computes a resolution

=C2=A0- supports intervals between events ("coffee breaks")

=C2=A0- supports virtual ranges (end time is before start time)

=C2=A0- customizable levels of automation

=C2=A0- designed to be put on the C-c C-c hook, makes timestamps magic

=C2=A0- dedicated interactive and non-interactive modes

Please let me know if this package is remotely useful, completely
misses the point or has crippling bugs and oversights.

Regards,

Thomas

--00000000000093f859058ae311f7--