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

How to customize org-super-agenda-groups and faces inside org-ql-block #244

Closed
ieremies opened this issue Aug 14, 2021 · 3 comments
Closed

Comments

@ieremies
Copy link

First, thanks for the package! It is no fricking useful!!!

I'm trying to set some blocks in my agenda, and I'm running into some problems:

image

First, as we can in the above image, on the block "Open" there is also the org-super-agenda grouping. I know with normal org-agenda blocks, we can set org-super-agenda-groups to nil in order to disable in a block. How can I do this with org-ql-block?

Second, also exemplified in the image, the results in the block have different color than the ones in the agenda. Those in the agenda have the org-agenda-face applied to then, but I can find a face to customize those in the block. How could I change their color?

Last, but no least, I really want some way to show the category of a task in that new block. Preferably, in the same way org-agenda does. Is there a way?

@alphapapa
Copy link
Owner

alphapapa commented Aug 14, 2021

Hi,

Thanks for the kind words. I'm glad it's useful to you.

First, as we can in the above image, on the block "Open" there is also the org-super-agenda grouping. I know with normal org-agenda blocks, we can set org-super-agenda-groups to nil in order to disable in a block. How can I do this with org-ql-block?

Please see the documentation for the variable org-agenda-custom-commands. It's a little complicated, but it describes how to bind variables around each block, which you can use to do that. (Well, I see that you're already binding org-ql-block-header, so you just need to bind the other variable in that binding list.)

Second, also exemplified in the image, the results in the block have different color than the ones in the agenda. Those in the agenda have the org-agenda-face applied to then, but I can find a face to customize those in the block. How could I change their color?

I guess you'd need to write a little code to do that. I'm not sure if that face's not being set is an oversight or if something changed in Org that org-ql needs to be updated for. (You might also sometimes use an org-ql-search view instead of an org-agenda view, which would not add that face, but would display more uniformly. But that doesn't yet support the same kind of multiple-blocks features that org-agenda does.)

Last, but no least, I really want some way to show the category of a task in that new block. Preferably, in the same way org-agenda does. Is there a way?

For now, you'd have to customize the formatting function. Please see the relevant issue in this tracker about custom formatting.

Obrigado. :)

@ieremies
Copy link
Author

Sorry for the late reply.

Please see the documentation for the variable org-agenda-custom-commands

I got it working! I think I messed up the parenthesis the first time and thought it wouldn't work with org-ql-block.

I guess you'd need to write a little code to do that. I'm not sure if that face's not being set is an oversight or if something changed in Org that org-ql needs to be updated for.

I will look into that, but I'm not yet so well versed in the almighty Elisp to adventure myself on the word of faces. What I think is happening is org-agenda does not apply any face to entries by default. Since my agenda only show items with deadlines, schedules, clocked and so, and those have special faces, when org-ql-block shows items without any of those, it defaults to no-face.

image
(First is clocking, second has a deadline but third has none, so no face is aplied.)

For now, you'd have to customize the formatting function. Please see the relevant issue in this tracker about custom formatting.

Yep, found it #44 .

Obrigado. :)

Eu que agradeço!!

@alphapapa
Copy link
Owner

I will look into that, but I'm not yet so well versed in the almighty Elisp to adventure myself on the word of faces. What I think is happening is org-agenda does not apply any face to entries by default. Since my agenda only show items with deadlines, schedules, clocked and so, and those have special faces, when org-ql-block shows items without any of those, it defaults to no-face.

Ah, that makes sense. I think you figured it out. :) Thanks.

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

No branches or pull requests

2 participants