Closed debajyoti1990 closed 1 year ago
Below is one sample output in my terminal.
It is reproducible on any OS as it was designed this way from the beginning :smile: But I am not saying that it must remain this way forever.
Let me explain why I chose this way. In the very beginning I used a thirdparty library to parse and process tasks in todo.txt format. Its feature was: remove all tags while parsing and add some of them to the end of the task. If I am not mistaken, only standard tags like "rec", "thr", and "due" were hidden. First I noticed that ttdl list
did not displays my tasks in the same way I composed them. The I found that tag processing code. And finally I realized that I do not like that way because of 2 main troubles:
order online on loc:amazon a xmas gift by due:2022-12-15
, ttdl list
shows it as order online on a xmas gift by loc:amazon
. As you see, its meaning becomes a bit hard to getHence, we have to agree on some stuff before starting the implementation. Here are my thoughts:
subject
s as-is. At first sight, it seems that a good solution is to hide some (more about it in the next bullet points) tags and show the entire subject
with a command-line option(not sure about its name yet). In addition, it makes sense to introduce a config option like show_subject
with possible values at least full
(or as-is
) and auto
(it can be more values depending on many things)list --fields=pri
. What about due
in this case? My idea is to hide only things that are already displayed in another columns. So, when displaying all the fields, due
and thr
would be removed from the subject
when printing. I do not think we need an option for this: auto
can be good enough.custom columns
feature. I guess TTDL should hide all custom tags(if columns are displayed) in subject
as well.subject
column to avoid duplication? First thought: yes, it should. Second thought: what if project/context is a part of meaningful message and removing it ruins the message?What do you think?
Your points are very much valid, I get the idea. Actually the .gif in github homepage was showing due only once, that's why I thought there might be something I am missing or something broke in latest release, although I vaguely remember I saw this in last release also.
I think hiding due column is a good option. I have not tried it yet, will try. I was thinking maybe it was possible to strip all tags like due, context or project from subject and show the remaining.
I see. I suspect that I took the screenshot before I replaced the thirdparty todo.txt library with my own parser 😄
Another case when seeing all tags in the subject is useful: when listing with --human
. In this case, column Due
displays often approximate value like 2w
or 5m
, but subject displays the exact due date:
# D P Created Due Subject
-------------------------------------
44 2w ago in 5m doctor checkup due:2023-10-11
Though, it may be not frequent case.
Anyway, let's sum everything up. As we agreed at some points, my current roadmap is:
global.hide_elements
. Possible values are auto
(default - hide everything that is duplicated in subject and any other column), tags
(hide only duplicated tags, but keep subject/context - for cases when subject/context are part of the message), none
(do not hide anything - it is how it works at this moment)--hide
with the same 3 values as above (to override the config value)If needed, we can add more values to the list for more fine-grained control. But I doubt we do it any time soon.
Reproducible in Windows 10. Although it is not a major issue, looks somewhat weird. Could not find anything in ttdl.toml file related to this.