blogmore.el v1.4
Following on from yesterday's post, in the evening I found myself in a cafe with my MacBook Pro and an hour to kill, so I tinkered with blogmore.el a little more. The main aim here was to add a command for adding tags to a post and I now have blogmore-add-tag as of v1.4.
One thing that stood out was just how rusty my Emacs Lisp skills are. It took me a wee while to get the code working, mostly due to me being caught out by the gotchas I'd forgotten about surrounding match data and the need to make good use of save-match-data (I had a combination of re-search-forward, string-split and replace-match going on and it was chaos for a while).
I got there in the end, though, when I bothered to RTFM with a quick C-h f
string-split RET.

So now I have the following commands in Emacs when I get the urge to do something blog-related:
blogmore-newstarts a new blog postblogmore-editlets me edit an existing postblogmore-set-categorylets me set the category from existing categories, or set a new oneblogmore-add-taglets me add a tag from the existing tags, or add a new one
As suggested before, I think I'll probably add some other helper commands, things such as:
- Update the
date - Set the
coverto a particular attachment - Insert a particular attachment as a Markdown image
- Insert a link to another post in the blog
I'm sure more will come to me, but they seem like the most common operations I perform that would be helped with a little bit of Emacs Lisp magic.