Hi Nicolas,


On Mon, Apr 23, 2018 at 11:08 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Carsten Dominik <dominik@uva.nl> writes:

> I would be interested to discuss a better solution.  It would be nice is
> list items could be TODO's, but I though long and har about this back when,
> and over allo those years, I could not think of anything that could be
> implemented with reasonable effort.

I think we have to make inline tasks more limited, yet still useful.

One major technical drawback stems from the fact that they allow
contents.


  *************** Foo
  ...
  *************** END

 

It means that they allow, e.g., properties (it hurts inheritance), or
clocks that do not belong to the containing headline but to the inline
task itself... It would be a major pain if we had to handle this
seriously, as a core feature.

Yes,  I agree with this.  It is there in oder to allow fully functional
TODO entries, with scheduling and logging.  But indeed, it does
not play correctly with things like inheritance and clocking.
 

Now, if we allow them to have no contents, it becomes much more
manageable. It means we can still have TODO, tags, priority, but no
clock, no properties, no log...

It would also mean we would disallow SCHEDULED and DEADLINE keywords,
but we can make an exception for those, and allow a planning line right
after an inline task.

So, basically, there would be two forms of inline tasks:

  *************** Foo

and

  *************** Foo
  SCHEDULED: <...> DEADLINE: <...>

Now we know why these are not properties :)
 

With this simplification, we could manage them, probably without too
much hassle.

Not a bad compromise.  It is also somewhat backward compatible,
because ***** END would end up being just another inline-task-like headline,
and older files would not stop working.
 
If you want to associate the task some contents, you can attach, e.g.,
some drawer below. It is not part of the inline task syntax, yet it
could work well in practice:


  *************** TODO Foo
  :task:
  This is because the...
  :end:

However, there is another important drawback: they look like headlines.
That breaks a fundamental assumption in Org: any line that doesn't start
with an asterisk (I'm oversimplifying here) "belongs" to the first line
starting with one above. This is simply not true with inline task, so we
use the `org-with-limited-levels'. It kind of works, except in parts of
Org that forgot to use it (lots of fun ahead).

Yes, inline task is an incomplete implementation, basically a hack.
 

We could go further and get away from the starred syntax and the column
0. E.g.,

  !! TODO Foo     :bar:baz:

The advantage is that they would integrate better with the rest of the
document:

  - Grocery list
    - Apples
    - Bread
      !! REMINDER ...

However, it would be a /lot/ more work to implement the feature shared
with regular headlines (TODO switching, tags inheritance)... but, at
least, they would look better.

What would look even better is 

  - Grocery list
    - Apples
    - TODO Bread
      SCHEDULED: ....

But I have always thought that this would be nightmarish to implement,
because the assumption that all of these special entries are nodes is
sooo deep in the code...

So I would say:

either we keep it as the hack, or use the limitation you
mention and get rid of the END line.  But I am not sure it is really
with the trouble to replace a bad hack with a slightly better hack.

Carsten


 

Regards,

--
Nicolas Goaziou