Closed realcomplex closed 1 year ago
Nice find, I changed the two functions circadian-sunrise
and circadian-sunset
to check vor nil
values and print errors in case:
⛔ Error (use-package): circadian/:init: No valid sunset from solar-sunrise-sunset, consider using fixed time strings, e.g. (setq circadian-themes ’(("9:00" . wombat) ("20:00" . tango)))
⛔ Error (use-package): circadian/:init: No valid sunrise from solar-sunrise-sunset, consider using fixed time strings, e.g. (setq circadian-themes ’(("9:00" . wombat) ("20:00" . tango)))
Hope this helps. Let me know if you'd consider any other behaviour as better or more convenient.
Hi! Thanks for the nice package, I'm happily using it.
I have an annoying edge case for you... I current live somewhere north of the arctic circle, and this means that there are currently no sunsets or sunrises. This means that
(solar-sunrise-sunset (calendar-current-date))
evaluates to(nil nil "0:00")
instead of the usual((6.8833333337679505 "CET") (16.283333332277834 "CET") "9:24")
(for example). This means thatcircadian--frac-to-time
receives a value ofnil
when circadian is set up, and raises and error.Could you possibly add a test for this somewhere? Ideally, of course, circadian should just use the "sunset" theme when the sun is currently down (which should be checked for somehow, since
solar-sunrise-sunset
will return nil regardless) and the "sunrise" theme when the sun is currently up.Let me know if you would like me to have a stab at fixing this!
Backtrace: