guidoschmidt / circadian.el

Theme-switching for Emacs based on daytime
https://guidoschmidt.github.io/circadian.el
MIT License
176 stars 8 forks source link

Use `solar-sunrise-sunset` to avoid dealing with strings. #17

Closed sarg closed 6 years ago

sarg commented 6 years ago

solar-sunrise-sunset returns the same information as sunrise-sunset in data structure instead of string. Using it greatly reduces complexity of the program.

guidoschmidt commented 6 years ago

Nice improvement! Thanks so much for the PR 👍 I didn't know about solar.el when first building circadian - thanks for introducing it to me 🙂 really appreciate it.

sarg commented 6 years ago

In fact sunrise-sunset function you used is from solar.el. You could look it here if you don't have emacs sources installed https://github.com/emacs-mirror/emacs/blob/master/lisp/calendar/solar.el

btw, the tests you wrote proved to be very useful. And travis setup is also cool. I'll definitily use something like that in my own project.

ps. #13 should be fixed now.