Scientific writing with Emacs: style-check and writegood-mode

stylistic “errors” in this blog post Today I discovered a nice tool for improving your scientific writing: Neil Spring’s style-check.rb. In a primitive but effective way (and aware of LaTeX markup!), it checks your document for the occurrence of typical style or syntax errors. These are implemented as a configurable list of regular expressions. style-check.rb reports any encountered errors like a compiler, with line and column number, according to the developer’s philosophy that writing is just a special case of coding. When executing the script manually, its output is somewhat hard to “process” for a human, so I thought, why not integrate it into Emacs. Emacs is prepared for dealing with compiler output, so the solution was straightforward:

(defun style-check-file ()
  (interactive)
  (compile (format "style-check.rb -v %s" (buffer-file-name))))

this blog post with writegood-mode enabled In the same run, I should also recommend another tool, which finds different errors, and overall less of them, but integrates into Emacs even more conveniently: Benjamin Beckwith’s writegood-mode. I recommend binding it to C-c g:

(require 'writegood-mode)
(global-set-key [(control c) ?g] 'writegood-mode)

For those who don’t use Emacs, there is also the possibility to use Matt Might’s standalone “weaselwords” script, which gave the inspiration for writegood-mode.

Tags: , , , ,

Leave a Reply

You must be logged in to post a comment.