Site icon Random Thoughts

Live Camera/Emacs Link

I mostly use Emacs for WordPress blogging, and it works fine, but it’s a bit cumbersome to snap pictures, hunt around for them, and include them in the article manually.

It would be nice to be able to type away at a blog (or email), and then take some pictures and have them included in the Emacs buffer immediately.

So: This tiny Emacs function. (It requires an Emacs with lexical binding; i.e., one from the last two years or so? Four? Nine? Time flies. (This is the first time I’ve written something in Emacs using lexical binding, and everything just worked. Kudos to Stefan Monnier…))

See, I’m writing…

It worked!!!one!!!

Here’s the obligatory video:

Magic!

It’s not particularly snappy, because the FlashAir SD card isn’t all that snappy, and the cinematic epic up there ends with a close-up of the wifi range extender I have to use because the range of the FlashAir card is like two meters, but…

Oh, one final stupid trick: Most MTAs frown on sending jiggobytes of data via email. That’s so three months ago. To work around that, I send things directly to the WordPress MTA, which has pretty generous thresholds:

(setq smtpmail-smtp-server "mx1.lax.wordpress.com"
      smtpmail-smtp-service 25)

Or rather, I bind those variables around the `C-c C-c’ command…

The WordPress MTA/blog link thing is very fast.  The drafts usually show up in the “all posts” list a second or two after the mail finished being sent.

Exit mobile version