emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: Thomas Plass <thunk2@arcor.de>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [ANN] org-conflict add-on: timing conflicts detector and resolver for Org agenda
Date: Sun, 9 Jun 2019 15:18:34 +0300	[thread overview]
Message-ID: <CAJKAhPAJ3rZNr2xJaqnbKKvjOzfgZucb6NJLzLbweRxa7nYG4g@mail.gmail.com> (raw)
In-Reply-To: <23718.24027.215006.427898@AGAME7.local>

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

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, …) and 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 „you 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“. 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…
  Scheduling algorithms are very hard. Repetitions, time zones, summer time
changes, …

  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 „coffee
breaks“ 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 „right now I'd like to write a date to see whether it
would conflict with anything“; this is a use case I never have thought of
or needed previously. My needs have rather been:
    1) „right now I'd like to schedule a task“ (hopefully at 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, „enhance them“ 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, …) in an org file to do my
planning, and ignore org-mode tasks, since org scheduling isn't helpful yet.
My ideal goal would be to tell org „take *all* open tasks in my files 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“. This is just the starting
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 „constraint
programming“. Like with minizinc <https://www.minizinc.org/> and others,
with which producing conflict-free schedules should be easy.
Now who can integrate org-mode scheduling with minizinc…? Or with a logic
programming framework in Emacs Lisp like reazon
<https://github.com/nickdrozd/reazon>…


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, …)!


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

[-- Attachment #2: Type: text/html, Size: 10500 bytes --]

      reply	other threads:[~2019-06-09 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 19:41 [ANN] org-conflict add-on: timing conflicts detector and resolver for Org agenda Thomas Plass
2019-06-09 12:18 ` Daniel Clemente [this message]

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=CAJKAhPAJ3rZNr2xJaqnbKKvjOzfgZucb6NJLzLbweRxa7nYG4g@mail.gmail.com \
    --to=n142857@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=thunk2@arcor.de \
    /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).