Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dim blocked tasks in org-ql-view #189

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akirak
Copy link
Contributor

@akirak akirak commented Feb 11, 2021

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
Copy link
Contributor Author

akirak commented Feb 11, 2021

This implements #105 (comment).

@akirak akirak force-pushed the feature/ql-view-dim-blocked branch 2 times, most recently from b7fc664 to 7ba309b Compare July 28, 2021 08:38
@akirak akirak force-pushed the feature/ql-view-dim-blocked branch from 7ba309b to 0201daa Compare July 28, 2021 08:39
@akirak
Copy link
Contributor Author

akirak commented Jul 28, 2021

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

@alphapapa
Copy link
Owner

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

@akirak
Copy link
Contributor Author

akirak commented Aug 3, 2021

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.

@alphapapa
Copy link
Owner

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.

@akirak
Copy link
Contributor Author

akirak commented Sep 22, 2021

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.

@alphapapa alphapapa marked this pull request as draft September 22, 2021 11:57
@alphapapa
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants