Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bugfix dashboard-filter-agenda-by-time. #269

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

Conversation

ricardoricho
Copy link
Contributor

@ricardoricho ricardoricho commented Dec 9, 2020

Solves #266
When schedule-time or deadline-time is nil but not both,
org-time-less-p treat them as current-date. Filter will skip the entry
unless it's not done and has schedule time less than due date or has a
deadline time less than due date.

There are other ways to express this condition

(when (or (org-entry-is-done-p)
          (and (or (null schedule-time)
                   (org-time-less-p due-date schedule-time))
               (or (null deadline-time)
                   (org-time-less-p due-date deadline-time))))
  (point))

Or

(cond
  ((org-entry-is-done-p) (point))
  ((and schedule-time
        (org-time-less-p schedule-time due-date)) nil)
  ((and deadline-time
        (org-time-less-p deadline-time due-date)) nil)
  (t (point)))

@jcs090218 jcs090218 linked an issue Dec 9, 2020 that may be closed by this pull request
When schedule-time or deadline-time is nil but not both,
org-time-less-p treat them as current-date. Filter will skip the entry
unless it's not done and has schedule time less than due date or has a
deadline time less than due date.

There are other ways to express this condition
```ruby
(when (or (org-entry-is-done-p)
          (and (or (null schedule-time)
                   (org-time-less-p due-date schedule-time))
               (or (null deadline-time)
                   (org-time-less-p due-date deadline-time))))
  (point))
```
Or
```ruby
(cond
  ((org-entry-is-done-p) (point))
  ((and schedule-time
        (org-time-less-p schedule-time due-date)) nil)
  ((and deadline-time
        (org-time-less-p deadline-time due-date)) nil)
  (t (point)))
```
@ricardoricho ricardoricho force-pushed the bugfix-dashboard-agenda-filter-by-time branch from d24f220 to 823d687 Compare December 9, 2020 07:22
@jcs090218 jcs090218 merged commit f839982 into emacs-dashboard:master Dec 9, 2020
@jcs090218
Copy link
Member

Merged! Thank you so much!

@ricardoricho ricardoricho deleted the bugfix-dashboard-agenda-filter-by-time branch December 9, 2020 14:25
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

Successfully merging this pull request may close these issues.

the dashboard showing aganda shows all TODO's
2 participants