More posts about: blogging, emacs, writing // 11 Comments »
Analyzing the text of my blog showed me that I use some phrases way too much. Fortunately, Emacs can shame me into writing better, thanks to Art Bollocks Mode. (Update 2012-06-16: I’ve forked it and cleaned up the naming conventions: https://github.com/sachac/artbollocks-mode)
Art Bollocks Mode monitors your writing and highlights words or patterns you may want to reconsider. It can detect repeated words which sometimes slip past proof-reading. It has a list of common passive verbs, making it easier for you to rewrite the sentences to use the active voice. It detects weasel words like “many” and “surprisingly”. It even comes with jargon catchers for art critics (“postmodern”, “ironic”, and so forth) – hence artbollocks-mode.el.
Whenever you use a phrase that matches its patterns, Emacs highlights it, turning it an ugly orange-on-white and underlining it for emphasis. You can still go ahead and write it, but at least the words jump out. Like this: it’s really pretty obvious…
I want to use it to write clearer notes and blog posts, so here’s how I’ve tweaked my configuration. Many of the items below are words and phrases I want to use less. Others are part of work jargon that I’m trying my best to keep out of my regular use.
(require 'artbollocks-mode) ;; Avoid these phrases (setq weasel-words-regex (concat "\\b" (regexp-opt '("one of the" "should" "just" "sort of" "a lot" "probably" "maybe" "perhaps" "I think" "really" "pretty" "maybe" "nice" "action" "utilize" "leverage") t) "\\b")) ;; Fix a bug in the regular expression to catch repeated words (setq lexical-illusions-regex "\\b\\(\\w+\\)\\W+\\(\\1\\)\\b") ;; Don't show the art critic words, or at least until I figure ;; out my own jargon (setq artbollocks nil) ;; Make sure keywords are case-insensitive (defadvice search-for-keyword (around sacha activate) "Match in a case-insensitive way." (let ((case-fold-search t)) ad-do-it))
regexp-opt so cool?)
artbollocks-mode.el also includes some basic readability statistics like the Flesch reading ease and Flesch-Kincaid grade level. When I analyzed my blog contents without source code blocks (all the Emacs Lisp code snippets were throwing off my numbers!), it turned out that my blog hovers around 65 in terms of Flesch reading ease, or around the same as Reader’s Digest (as reported by Wikipedia). The Flesch-Kincaid grade level for my posts in 2011 was around 8.4.
I’d use artbollocks-mode.el’s tools for calculating word count and readability, except that Emacs ends up including source code blocks because Art Bollocks doesn’t know about Org Mode. I might be able to work around that by defining more advice or creating my own functions that extract the relevant text into a temporary buffer before determining the text statistics. I can leave that for another day, though.
I’ll experiment with making it part of org-capture-mode for now. If I find that getting editing feedback distracts me too much from writing, I’ll remove it from the hook and toggle it when I’m ready. Here’s the code to turn it on automatically for
(add-hook 'org-capture-mode-hook 'artbollocks-mode)
Thanks to dotemax for tweeting about writegood and artbollocks-mode.el. Onward and upward!
- 29 December 2011 at 3:12pm
- The Emacs regexp-opt Function | Irreal 30 August 2014 at 4:08pm
- Software For Writers: Tools To Improve Your Writing - My blog
[...] Sacha Chua introduced me to regexp-opt, an Emacs function that I hadn’t seen ...
[…] emacs users, there’s artbollocks-mode, which has a built-in readability ...