-
Notifications
You must be signed in to change notification settings - Fork 109
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
Subtree agenda restriction is ignored by org-ql-block #84
Comments
This would probably be fixable, but IIRC the agenda restriction code is not so straightforward. In general, the org-ql-block feature is not intended to be completely compatible with or to respect all agenda features. To make it so would defeat some of the purpose of org-ql, which is to reimplement some of the agenda's features (maybe most of them, eventually) in a more usable way. The org-ql-block feature exists because it is useful and was simple to implement to the current extent. I probably won't put much effort into adding compatibility with features like this, because I'd rather work on a better agenda-like view (e.g. the |
I see. May I know how the |
I took another look at the Org Agenda restriction code and found that supporting it isn't as complicated as I expected. This seems to work. Please let me know how it works for you. Thanks. |
I just tried the laterst git version of org-ql. Does not seem to work, even though your code looks reasonable. I tried to debug a bit and found that |
As you can see in the code, |
I used the following init.el loaded after emacs -q:
The "D" agenda should provide equivalent of default List of TODO entries. However, the org-ql version still gives todos from all the file, ignoring subtree restriction. If needed, I can also provide the .org file. |
One blind guess is that |
It works for me.
(setf org-agenda-custom-commands
'(("x" ""
((org-ql-block '(and (todo) (tags "Emacs")))))))
Result: Only entries from the subtree are displayed.
No, |
|
What command does |
Pressing |
I'm asking what Emacs command function is called by the code. Here's what I see:
Therefore I conclude that the fact that As well, the fact that some restriction-setting code seems to be duplicated in Would you be willing to file a report or raise the discussion on the Org list? I very rarely use Agenda restrictions myself. |
I think that there is actually a way to determine if the restriction is set to file or subtree without a need to access to |
Fixed in 0f5cf5e and 0.4.9. Thanks. |
When I try to apply restriction to an agenda with
org-ql-block
, the buffer restriction works as expected, but not the subtree restriction. Instead of only listing matching items from the subtree, org-ql acts as if it was a buffer restriction.The text was updated successfully, but these errors were encountered: