mpcjanssen / simpletask-android

GNU General Public License v3.0
550 stars 128 forks source link

Support implicit parent child relationships using indentation for creating outlines. #339

Open tomtom opened 8 years ago

tomtom commented 8 years ago

Is there a chance, you'll add support for outlines à la https://github.com/ginatrapani/todo.txt-cli/wiki/Todo.sh-Add-on-Directory#outline--plan-with-an-outline-sync-your-next-actions

Regards

mpcjanssen commented 8 years ago

If I understand this correctly, it allows selective sync based on tabs in the source file.

Because Simpletask uses the todo.txt file as the storage, selective sync is not really possible at the moment. However in the future (when the database backend matures) things like this might become possible.

I will tag this someday/maybe for now so don't expect anything any time soon.

tomtom commented 8 years ago

IMHO the implementation of outlines by the plugin is questionable. At its core, outlines rather work as filters -- in the overview only the leafs of the tree of tasks will be shown, where a leaf is a node with no pending/open subtasks. This is how I implemented this feature in https://github.com/tomtom/ttodo_vim (which is, besides simpletask, what I use to work with todo.txt files) and I find it quite useful there.

mpcjanssen commented 8 years ago

There is no real way to make a filter like this in Simpletask at the moment because filtering doesn't consider adjacent tasks. I could possible make the complete task list available when filtering with Lua so that you could use Lua to make this custom filter. I will look into enabling this without degrading performance too much.

smichel17 commented 8 years ago

With the clarified definition of outlines, is #362 a duplicate of this issue?

mpcjanssen commented 8 years ago

@smichel17 I don't think so, the outline idea as I understand it requires a partial sync from the outline to todo.txt. You could use #362 to implement a similar thing though.

Anyway partial sync is never going to happen, IMO it should be handled by a separate application which will generate tasks.

tomtom commented 8 years ago

requires a partial sync from the outline to todo.txt

You're clinging too much to the particular implementation as an addon for the todo CLI app.

With respect to the other thread at issue #362, these two todo lists are equivalent:

As outline:

foo
  bar1

As dependencies:

foo id:id1
bar1 p:id1
mpcjanssen commented 8 years ago

I read the original request as:

foo
  bar1

Becomes

bar1

This is not going to happen. #362 might.

tomtom commented 8 years ago

I read the original request as:

|foo bar1 |

Becomes

|bar1| That would be the result after filtering tasks with open/pending dependencies. This would be a nice extra but it's IMHO not an essential feature.

IMHO one has the distinguish between the basic idea of outlines and particular implementations. The way I see it, outlines are a simple way to express tree-like dependencies with minimal textual overhead (leading whitespace).

To make this work I see two possibilities: (1) If you don't have control over the main source code, sync outlines with the main todo.txt file as the CLI addon does it. (2) If you have control over the source code, implement some additional bookkeeping in the function that reads the todo.txt file in order to add implicit IDs and inherit tags and lists from the parent task when reading indented tasks.

Anyway, I understand you hesitating to implement a feature you yourself don't see much use for. So I'll stop here. Thanks for your efforts.

mpcjanssen commented 8 years ago

@tomtom I am open to interpreting indentation as implict id: and dep: fields. I have renamed the issue to reflect this. Of course this will then require #362 to be implemented.