Giter Site home page Giter Site logo

Explicit OR? about org-super-agenda HOT 10 CLOSED

eugene-jetruby avatar eugene-jetruby commented on September 26, 2024
Explicit OR?

from org-super-agenda.

Comments (10)

eugene-jetruby avatar eugene-jetruby commented on September 26, 2024 1

And it does work! Thank you for your help!

from org-super-agenda.

eugene-jetruby avatar eugene-jetruby commented on September 26, 2024 1

Yes, it does work, and it reads simpler. Thank you @tuh8888

Btw, "past or today" sounds like a pretty common usecase for me. Doesn't it deserve its own selector? @alphapapa

from org-super-agenda.

alphapapa avatar alphapapa commented on September 26, 2024

Hi Eugene,

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

I suppose this could be a shortcoming in the :scheduled selector. But have you tried this?

(:name "Routine" :and (:tag "daily" :scheduled past :scheduled today))

I'm guessing that would work, but I haven't tried it. Please let me know whether it does.

Thanks.

from org-super-agenda.

eugene-jetruby avatar eugene-jetruby commented on September 26, 2024

No, it returns no entries. And that seems to be the correct behavior for :and, because a headline can not be scheduled for two days at the same time. That's exactly what I want to achieve: tag = 'daily' AND (scheduled = 'past' OR scheduled = 'today')

from org-super-agenda.

alphapapa avatar alphapapa commented on September 26, 2024

Of course, you're right. I haven't used my own pseudo-language here in a while. :)

How about this?

(:name "Routine" :and (:tag "daily" :scheduled past) :and (:tag "daily" :scheduled today))

I think that will do it, even though it's a bit awkward compared to having an :or selector.

from org-super-agenda.

tuh8888 avatar tuh8888 commented on September 26, 2024

Since today AND past = NOT future, maybe this would be simpler:

(:name "Routine" :and (:tag "daily" :not (:scheduled future)))

from org-super-agenda.

alphapapa avatar alphapapa commented on September 26, 2024

@tuh8888 An entry that is :not (:scheduled future) could also be unscheduled, so that selector would not be equivalent.

from org-super-agenda.

tuh8888 avatar tuh8888 commented on September 26, 2024

That's good to know. What about this then?:

 (:name "Routine" :and (:tag "daily" :not (:scheduled future) :scheduled t))

from org-super-agenda.

alphapapa avatar alphapapa commented on September 26, 2024

Yes, I think that should work. I forgot that t is a valid argument to :scheduled. Good idea!

from org-super-agenda.

alphapapa avatar alphapapa commented on September 26, 2024

Btw, "past or today" sounds like a pretty common usecase for me. Doesn't it deserve its own selector?

Generally I'd rather aim for composability than special combinations which would have to be documented, looked up, remembered, etc.

from org-super-agenda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.