Another wee update to blogmore.el,with a bump to v4.2.After adding the webp helper commandthe other day, something about it has been bothering me. While the commandis there as a simple helper if I want to change an individual image towebp -- so it's not intended to be ageneral-purpose tool -- it felt "wrong" that it did this one specific thing.So I've changed it up and now, rather than being a command that changes animage's filename so that it has a webp extension, it now cycles through asmall range of different image formats. Specifically it goes jpeg to pngto gif to webp.With this change in place I can position point on an image in the Markdownof a post and keep running the command to cycle the extension through thedifferent options. I suppose at some point it might make sense to turn thisinto something that actually converts the image itself, but this is aboutgoing back and editing key posts when I change their image formats.Another change is to the code that slugs the title of a post to make theMarkdown file name. I ran into the motivating issue yesterday when postingsome images on my photoblog. I had a titlewith an apostrophe in it, which meant that it went from something likeDave's Test (as the title) to dave-s-test (as the slug). While the slugdoesn't really matter, this felt sort of messy; I would prefer that it cameout as daves-test.Given that wish, I modified blogmore-slug so that it strips ' and "before doing the conversion of non-alphanumeric characters to -. Whiledoing this, for the sake of completeness, I did a simple attempt at removingaccents from some characters too. So now the slugs come out a little tidierstill.(blogmore-slug "That's Café Ëmacs")"thats-cafe-emacs"The slug function has been the perfect use for an EmacsLisp function I've never used before: thread-last. It'snot like I've been avoiding it, it's just more a case of I've never quitefelt it was worthwhile using until now. Thanks to it the body ofblogmore-slug looks like this:(thread-last title downcase ucs-normalize-NFKD-string (seq-filter (lambda (char) (or ( char #x36F)))) concat (replace-regexp-in-string (rx (+ (any "'\""))) "") (replace-regexp-in-string (rx (+ (not (any "0-9a-z")))) "-") (replace-regexp-in-string (rx (or (seq bol "-") (seq "-" eol))) ""))rather than something like this:(replace-regexp-in-string (rx (or (seq bol "-") (seq "-" eol))) "" (replace-regexp-in-string (rx (+ (not (any "0-9a-z")))) "-" (replace-regexp-in-string (rx (+ (any "'\""))) "" (concat (seq-filter (lambda (char) (or ( char #x36F))) (ucs-normalize-NFKD-string (downcase title)))))))Given that making the slug is very much a "pipeline" of functions, theformer looks far more readable and feels more maintainable than the latter.