Hacking Emacs for Jekyll Stuff
I am very fortunate that my sweetie can hack Emacs for me. Oh, sure, I could learn elisp and do it for myself, but the time it would take to level up my proficiency... I take the easy way out. (๑´ㅂ`๑ )
Change Emacs auto-save file names so Jekyll rebuilds don't trigger
So far, I've asked for 2 things to help with my Jekyll issues. The first is to rename Emacs auto-save files so that they don't trigger Jekyll re-builds every time you touch a file. Sure, I tried to configure Jekyll to ignore files of that format (filenames starting with a "#") but nothing I tried worked. And so, this: And now the file names end with a "~" and Jekyll is happy to ignore them.
Generate a base 62 ID code with Emacs
While working
with imported
comments from Drupal, I figured the best thing to do going
forward if one wanted to continue with comments on blog posts was to
add in a nid
(node ID) field to post front matter.
Drupal uses a database, though and their NID is a number that
increments. I didn't want to use a database or even an incrementing
number stored somewhere. The easiest thing to do would be to use
system time since now that the import phase is essentially over, I'm
going to be generating my posts by hand so there's no chance of ID
collision with a key that is in time in seconds.
Having said that, and for no particularly good reason, I didn't like the raw time, it felt too long. I wanted to convert it to duosexagesimal format (base 62, alphanumeric using both upper and lower case letters). So, here that is, including my keybindings:
And here's an example ID "1HdFYp".
This has been Fun with Emacs. ୧( “̮ )୨✧