alphapapa / org-super-agenda

Supercharge your Org daily/weekly agenda by grouping items

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

org agenda daily span shows wrong day

SunflowerFieldsForever opened this issue · comments

I originally asked this as a question on Emacs Stack Exchange because I'm still rather new to Emacs and thought I just had a config error that I couldn't figure out, but I haven't found help on there. I haven't seen anyone really post about a similar problem, so I'm adding this here. If I'm in the wrong place, please redirect me.

I'm trying to produce a daily agenda view similar to the one given in the examples, and all seems to work well except that the daily view shows the day as three days in the past (for example, it's Friday right now and my agenda shows Tuesday and it's items).

The calendar shows today's date as being correct, and journal entries are marked with the correct date. The date on my system is correct. Taking away the org-super-agenda commands and leaving plain ol' org-agenda settings also shows the wrong date. As such, I'm not sure if I should be opening this issue here, or with org-agenda or even with doom-emacs.
Please advise. Below is my config:

(use-package! org-super-agenda
  :hook (after-init . org-super-agenda-mode)
  :config
  (setq org-agenda-time-grid (quote ((daily today) (600 800 1000 1200 1400 1600 1800 2000 2200) "......" "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"))
        org-agenda-include-deadlines t
        org-agenda-block-separator nil
        org-agenda-compact-blocks t
        org-agenda-span 'day
        org-agenda-start-with-log-mode t
        org-deadline-warning-days 4
        calendar-latitude 34.034520
        calendar-longitude -84.456010
        calendar-location-name "Marietta, GA")
  (setq org-agenda-custom-commands '(( "z" "Super view"
                                       ((agenda "" ((org-agenda-span 'day)
                                                    (org-super-agenda-groups
                                                     '((:name "Today"
                                                        :time-grid t
                                                        :date today
                                                        :scheduled today
                                                        :order 1)
                                                       (:name "Clocked Today"
                                                        :log t)))))
                                        (alltodo "" ((org-agenda-overriding-header "~~~~~~~~~~~~~~~~~~~~ Let's get some shit done ~~~~~~~~~~~~~~~~~~~~")
                                                     (org-super-agenda-groups
                                                     '((:name "Due today"
                                                        :deadline today
                                                        :order 1)
                                                       (:name "Important"
                                                        :tag "important"
                                                        :order 1)
                                                       (:name "Overdue"
                                                        :deadline past
                                                        :scheduled past
                                                        :order 1)
                                                       (:name "Daily Habits"
                                                        :tag "daily"
                                                        :order 1)
                                                       (:name "Habits"
                                                        :habit t
                                                        :order 2)
                                                       (:name "Due soon"
                                                        :deadline future
                                                        :order 2)
                                                       (:name "Working on"
                                                        :todo "STARTED"
                                                        :order 3)
                                                       (:name "Next to do"
                                                        :todo "NEXT"
                                                        :order 4)
                                                       (:name "Quickies"
                                                        :effort< "0:30"
                                                        :order 5)
                                                       (:discard (:tag("bible")))
                                                       (:name "Projects"
                                                        :children todo
                                                        :order 6)
                                                       (:discard (:anything t))))
                                        )))))))

Doom Emacs sets (org-agenda-start-day "-3d").

If you change your config to

[...]
(setq org-agenda-custom-commands '(( "z" "Super view"
                                       ((agenda "" ((org-agenda-span 'day)
                                                    (org-agenda-start-day nil)          <--------
                                                    (org-super-agenda-groups
                                                     '((:name "Today"
[...]

you should see the the agenda for the current day.

@agraul
Wow. I can't believe how simple that was. I actually did see documentation about org-agenda-start-day when digging on this but I mistakenly thought it only applied to weekly spans.
Nevertheless, thank you very much! My agenda finally works like a charm.