Closed 501st-alpha1 closed 7 years ago
Hi Scott,
Funny you should mention that, I was hesitant about doing the implicit OR, but it seemed like the most common case and easiest to implement, so I went ahead and did it last night. You're quick! :)
I was already thinking about adding the AND operation, so I will probably go ahead and do that. I'd be happy to look at your code if you'd like to share it; I can always use more ideas and examples.
Negation is a good idea too. I'll give it a shot at some point, but I'm starting to feel like I'm going to be writing a query language, and that would be way over my head, so we'll see. :) Maybe I can study the Org agenda filters and learn how they do it. I guess if I can get AND working, NOT should be simple to add.
And, of course, patches welcome! There are a lot of much more talented elisp programmers out there. I'm kind of surprised no one has made something like this already.
Thanks for the suggestion, and please let me know if you have any more!
By the way, could you give me some examples of your use cases? Not that I doubt you, I just haven't been able to come up with a situation where I'd use AND for my personal needs, and I'd like to better understand yours.
Ok, that wasn't too hard. I just pushed a commit that adds the :and
group. Please let me know if it works well for you!
Haven't updated the screenshot yet. I'd welcome any help designing better examples that show off all the groupers. :)
Just added the :not
matcher, which was much simpler than I realized it would be. Please do test and let me know how it's working for you! Thanks for your help.
Pretty sure these are working correctly, so I'm going to go ahead and close this. Please let me know if you have any feedback. :)
Apologies for the delayed response, this got buried in my todo list (ironically).
Thanks for making those changes! I've tested both :and
and :not
and they appear to be working fine.
Funny you should mention that, I was hesitant about doing the implicit OR, but it seemed like the most common case and easiest to implement, so I went ahead and did it last night. You're quick! :)
The funny thing is I had this project open in a browser tab for about a week before I actually got around to trying it out. 😄
Negation is a good idea too. I'll give it a shot at some point, but I'm starting to feel like I'm going to be writing a query language, and that would be way over my head, so we'll see. :) Maybe I can study the Org agenda filters and learn how they do it. I guess if I can get AND working, NOT should be simple to add.
This might be too late since you've already implemented the functionality, but another option would be to see if you can reuse Org Mode's built in matching functionality that it uses for "TAGS/PROP/TODO queries". E.g.: +ONE-TWO+TODO="DONE"
matches all DONE
tasks with the tag ONE
and without the tag TWO
. I haven't studied the differences too much, so that might also be less flexible than your current solution.
And, of course, patches welcome!
I intend to start using this regularly, so if I ever have some free time (ha!) and see something I could help with I may just do that.
There are a lot of much more talented elisp programmers out there.
I am probably not one of them. 😮 Most of my experience is from hacking on my init file, and only recently have I started working on standalone packages.
I'm kind of surprised no one has made something like this already.
Indeed. I have been looking for something like this for a while, so I'm glad I found this project!
By the way, could you give me some examples of your use cases? Not that I doubt you, I just haven't been able to come up with a situation where I'd use AND for my personal needs, and I'd like to better understand yours.
I currently have two main use cases for this. First is the Eisenhower Decision Matrix, which I implement as 4 tags ({,NOT}{URGENT,IMPORTANT}
). I suppose I could use four distinct tags for this (e.g. QUAD1
, etc.), but I think it might be useful to be able to query tasks by just one axis at a time.
The second use case is to assist with filtering jobs I might apply to. I use certain tags to represent things such as whether I'm qualified, the pay and benefits, etc. So with org-super-agenda
, I would first filter the best possible options from each category, so that I know I want to apply to those jobs first.
Both of these are solutions that I've hacked together because I couldn't find much online, and this was something I knew how to do. I'm definitely open to alternatives if there's something easier / better.
This might be too late since you've already implemented the functionality, but another option would be to see if you can reuse Org Mode's built in matching functionality that it uses for "TAGS/PROP/TODO queries". E.g.: +ONE-TWO+TODO="DONE" matches all DONE tasks with the tag ONE and without the tag TWO. I haven't studied the differences too much, so that might also be less flexible than your current solution.
Well, as I mention in the examples, while the code that implements the built-in advanced matching is faster, I don't like the syntax very much, and it seems hard to remember since I don't use it very often. One reason that it's faster is that it runs at a different stage in the agenda-building process. An idea to consider might be to translate the org-super-agenda selectors into the built-in advanced matching syntax. Also the code for the org-super-agenda selectors is rather primitive, since I don't have any experience in writing interpreters, so I'm sure someone who knows what he's doing could implement it much better.
I currently have two main use cases for this. First is the Eisenhower Decision Matrix, which I implement as 4 tags ({,NOT}{URGENT,IMPORTANT}). I suppose I could use four distinct tags for this (e.g. QUAD1, etc.), but I think it might be useful to be able to query tasks by just one axis at a time.
That's cool, I hadn't heard it referred to that way before. I think I first saw it in Covey's First Things First book. It is a useful way to organize task planning.
The Org agenda is flexible enough that you could use it to implement it in a way. For example, Org priorities could be used to represent urgency, and deadlines to represent urgency. Then you can use org-super-agenda to organize items into categories based on those properties. If you named each category according to the quadrants, it could approximate that. I guess that's what you're already doing.
The second use case is to assist with filtering jobs I might apply to. I use certain tags to represent things such as whether I'm qualified, the pay and benefits, etc. So with org-super-agenda, I would first filter the best possible options from each category, so that I know I want to apply to those jobs first.
Now that's a very interesting idea! I hadn't thought of using it that way before. If you have time to share an example, I'd love to add that to the examples file.
That's cool, I hadn't heard it referred to that way before. I think I first saw it in Covey's First Things First book. It is a useful way to organize task planning.
Yeah, I first heard about it in his 7 Habits book; I only learned the name after doing some research about it online. It has definitely been helpful in prioritizing the work I'm doing.
The Org agenda is flexible enough that you could use it to implement it in a way. For example, Org priorities could be used to represent urgency, and deadlines to represent urgency. Then you can use org-super-agenda to organize items into categories based on those properties. If you named each category according to the quadrants, it could approximate that. I guess that's what you're already doing.
I've heard something like this suggested before, but the main issue I have with it is that deadlines don't exactly align with urgency. Sometimes it can vary how long before a deadline a task becomes urgent, and sometimes I don't even have a deadline assigned to an urgent task.
Now that's a very interesting idea! I hadn't thought of using it that way before. If you have time to share an example, I'd love to add that to the examples file.
Sure, let me see if I can put something together and open a PR.
In the example code, you note:
I have some sections that I'd like to limit by multiple tags using AND instead. Is this currently possible, or if not, could such a feature be added? If it helps, I have already written a function that I can set as the
org-agenda-skip-function
to accomplish this.I'd also be interested in having the ability to filter to tasks that don't have certain tags, or maybe even more complex boolean constructions.