org-ql icon indicating copy to clipboard operation
org-ql copied to clipboard

Dim blocked tasks in org-ql-view

Open akirak opened this issue 4 years ago • 7 comments

This PR changes org-ql-search and org-ql-view to respect the value of org-agenda-dim-blocked-tasks variable, as in org-agenda. It works in both situations where the value is t and invisible.

Once these properties are added to text, org-agenda-dim-blocked-tasks function which is called from org-agenda-finalize-entries handles the rest.

akirak avatar Feb 11 '21 11:02 akirak

This implements https://github.com/alphapapa/org-ql/issues/105#issuecomment-604779135.

akirak avatar Feb 11 '21 13:02 akirak

@alphapapa This is an alternative to #190 which doesn't hide blocked entries but dim them.

akirak avatar Jul 28 '21 08:07 akirak

@alphapapa This is an alternative to #190 which doesn't hide blocked entries but dim them.

I'm not sure what you mean. Having a blocked predicate seems useful, regardless of dimming such tasks in view buffers.

alphapapa avatar Aug 03 '21 06:08 alphapapa

Having a blocked predicate seems useful, regardless of dimming such tasks in view buffers.

Yes, it would be possible to turn on this option to dim blocked entries, while hiding them using the blocked predicate, but it won't take any effect on actual presentation. If you show only blocked entries, this option will dim all items in the buffer, which again makes no sense. Therefore the blocked predicate and this dimming option should be used mutually exclusively, even if it is technically possible to use both of them. This is what I meant by alternative. The user can either hide blocked entries entirely using the predicate or just dim them via this option.

akirak avatar Aug 03 '21 09:08 akirak

Thanks for your patience.

Looking at this again, I'm not sure if I want to implement this feature, or at least not in this way. I'd prefer not to add support for all the org-agenda- special variables that modify its appearance or add features. I'm hoping to make the org-ql-view implementation cleaner and more flexible.

An alternative might be to have a list of functions that could modify a string in this way, and users who want to dim blocked tasks could add the function to the list.

What do you think? Thanks.

alphapapa avatar Sep 22 '21 07:09 alphapapa

I'd prefer not to add support for all the org-agenda- special variables that modify its appearance or add features.

Makes sense.

An alternative might be to have a list of functions that could modify a string in this way, and users who want to dim blocked tasks could add the function to the list.

That would be a good idea, as it would allow extra flexibility.

Actually, I don't need this feature right now, so you can close this PR. Thank you for your consideration.

akirak avatar Sep 22 '21 11:09 akirak

That's ok, I'll leave it open as an idea for future consideration. Thanks.

alphapapa avatar Sep 22 '21 11:09 alphapapa