Emacs and Astrobotany (publ. 2024-06-21)

I gave Astrobotany a try this last week. It is kind of fun, but I quickly realized I didn't want to manually water my plant each day. Emacs to the rescue! First I needed a function to water the plant:

This requires gmni to be installed. It uses the appropriate cert and key from the corresponding identity generated by lagrange.

Emacs has a timer library, so I just need some code in the init.el to start a timer:

That will run at 4am every morning so long as Emacs is running, which for me is pretty much 24x7. There is an oddity in the design of run-at-time, such that if the time of day is already past 4am when run-at-time is called (i.e., when the init.el file is loaded) then water-plant will immediately be run once. So the plant gets an extra watering every time I restart Emacs. But fortunately in Astrobotany watering attempts are automatically cancelled if the plant is already 100% hydrated.

Here are the public links to my plant:

Your plant

Your plant (with color)

I also wrote a little function to view the plant inside Emacs, so that I wouldn't have to bother switching over to Lagrange:

The lines at the end basically scroll down a bit to get the plant in view, and then it switches the buffer over to view-mode so I can just press "q" to close the buffer.

This work © 2024 by Christopher Howard is licensed under Attribution-ShareAlike 4.0 International.

CC BY-SA 4.0 Deed

Proxied content from gemini://gem.librehacker.com/gemlog/starlog/20240621-0.gmi

Gemini request details:

Original URL
gemini://gem.librehacker.com/gemlog/starlog/20240621-0.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.