Hi,

My use case is that I am experimenting with weekly timeboxes [0] (example [1]) fails when today is Tuesday and I run the Tue 07:30, instead of today, it is for next week (no matter if (setq org-read-date-prefer-future nil))

Looks like I solved locally with [2], that way, I think this is the right way of working

Let me put it in different words testing with today's Sunday:

This is how it works before my patch [2]:

-Sun 7:30 => [2026-11-08 Sun 07:30]
Sun 7:30 => [2026-11-15 Sun 07:30]
+Sun 7:30 => [2026-11-22 Sun 07:30]

This is how it works after my patch [2]:

-Sun 7:30 => [2026-11-08 Sun 07:30]
Sun 7:30 => [2026-11-22 Sun 07:30]
+Sun 7:30 => [2026-11-22 Sun 07:30]

I feel that this proposed way is more expressive, what do you think?

But that of course could break some other use case. The thing is, if, at least (setq org-read-date-prefer-future nil) is disabled, week day should not be ALWAYS future

Cheers,
pinmacs

[0] As defined from the book Indistractable https://www.nirandfar.com/timeboxing/

[1]
(my/fappt :title "1 activity example" :date "Tue 07:30" :tag "example" :effort "1:00" :location "example" :appt-type "in person") (my/fappt :title "2 activity example" :date "Wed 07:30" :tag "example" :effort "1:00" :location "example" :appt-type "in person") (my/fappt :title "3 activity example" :date "Thu 07:30" :tag "example" :effort "1:00" :location "example" :appt-type "in person") (my/fappt :title "4 activity example" :date "Sat 09:15" :tag "example" :effort "1:00" :location "example" :appt-type "in person")

[2]

(defun my/org-today-weekday (args)
  "When today is Sunday, make \"Sun 10:30\" mean today instead of next week."
  (let* ((today-name (format-time-string "%a"))
         (today-date (format-time-string "%Y-%m-%d")))
    (cons (string-replace today-name today-date (car args))
          (cdr args))))

(with-eval-after-load 'org
  (advice-add 'org-read-date-analyze :filter-args #'my/org-today-weekday))

Reply via email to