Emacs: Pull Random Gemini Capsules Part 2 (publ. 2024-06-05)

A while back, I wrote some code to pull a list of random gemini capsules using the Kennedy search engine:

Emacs: Pull Random Gemini Capsules

This has been helpful, but the main problem is the links still need to be parsed and then opened up in my gemini browser, Lagrange. I was doing this with a macro, which was not too bad, but had the idea that I should make something a little more general and convenient in elisp. During the lunchbreak I put this function together:

With this, then, I could pull the gemini links with the old function, switch to the buffer, and then execute this function. The additional plus side is that, in principle, it should work in any buffer that contains gemini links, assuming the links are absolute paths and can be processed by the browser.

This only works properly with browsers like Lagrange that can detect if they have a process open already, and I think the browser needs to be opened already before you call it. I added a 10 ms sleep in the loop because, if I don't, Lagrange freezes up. Something I didn't bother to look up was what kind of characters can actually be in the URL, and it does not do any other kind of validation. There are also a few things hard-coded in the function which maybe should be in separate variables. But it works for me.

Of course, as far as getting random gemini capsules, it makes sense to automatically launch the links in the browser rather than having to run another command for that. So I modified the original function accordingly:

I've found a lot of interesting capsules this way, though only about one in every forty or fifty links leads me to something that I want to subscribe to. Many of the others are interesting but haven't been updated for two or three years, so I don't bother subscribing to those ones.

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

Gemini request details:

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

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