Today I Learned

Always something.

Fix Debian Emacs Ispell

After using the testing repo for Debian Buster to install Emacs 27 I ran into an issue where spellcheck through ispell would not work

debian-ispell-set-startup-menu: Symbol's value as variable is void: ispell-menu-map-needed

Turns out the issue was in dictionaries-common, and fixed ages ago. Debian doesn’t like to keep with the times though, so I had to also install dictionaries-common from the testing repo to finally fix the issue!

sudo apt --target-release=testing install dictionaries-common


Starting new Ispell process ispell with default dictionary...done
Checking spelling of THIS...
THIS is correct

Using Ruby Proc Shorthand With Arguments

When following the Ruby Style Guide on single operation blocks, there are times where that operation is a method that needs to take an argument. To still use the Proc shorthand in these cases, the Object#method method allows passing each element of the enumerable to the method.

LETTERS = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r']

def number_to_letter(n)

# Lame
[17, 0, 12, 8].map { |s| number_to_letter(s) }

# Cool
[17, 0, 12, 8].map(&method(:number_to_letter))