Title Case in Emacs
February 9, 2013
I wrote a small Emacs Lisp library, titlecase.el for converting text to title case in Emacs. It provides three functions:
titlecase-string
converts a given string to title case and returns the result.titlecase-region
converts the given region to title case.titlecase-dwim
converts the region to title case, if there is an active region, or converts the current line to title case.
Rather than reinvent the wheel, this library is currently a wrapper
for the titlecase Perl script written by John Gruber and Aristotle
Pagaltzis. Place the titlecase
script in a directory that’s in your
Emacs exec-path
and make sure it’s executable. Otherwise, you’ll
need to change the value of the variable titlecase-command
to be the
full path to the script on your system.