If you’ve been following our journey of typography, you must now have pretty
apostrophes all over your org documents. But if that’s the case, you probably
also noticed a drawback. Ispell doesn’t like them very much. Now how are we
supposed to use our amazing auto-correct?
Don’t despair, dear reader, I have the solution. It wasn’t trivial to come up
with, but it’s quite simple to understand.
Tell Ispell that apostrophes are just like hard-quotes, where it comes
to constituting a word.
Convert all ’ to ' as they’re being sent to the Aspell subprocess.
Convert them back when reading the subprocess output. We even take care to
only do that in org-mode, so that it won’t get in the way of your LaTeX
buffers.
The following code uses the new advice system in Emacs 24.4. It can certainly be
made to work on older Emacs by changing it to use defadvice.
This is, admittedly, a hacky solution. But it’s been working well for me for the
last few weeks. Feel free to shout and scream at me if you run into issues.
Ispell and Apostrophes
11 May 2015, by Artur Malabarba.Typography post series
If you’ve been following our journey of typography, you must now have pretty apostrophes all over your org documents. But if that’s the case, you probably also noticed a drawback. Ispell doesn’t like them very much. Now how are we supposed to use our amazing auto-correct?
Don’t despair, dear reader, I have the solution. It wasn’t trivial to come up with, but it’s quite simple to understand.
org-mode
, so that it won’t get in the way of your LaTeX buffers.The following code uses the new advice system in Emacs 24.4. It can certainly be made to work on older Emacs by changing it to use
defadvice
.This is, admittedly, a hacky solution. But it’s been working well for me for the last few weeks. Feel free to shout and scream at me if you run into issues.
Update <2015-05-18 Mon>
Fixed the third regexp.
Tags: writing, ispell, keybind, init.el, emacs,
Proof general configuration for the Coq Software Foundations tutorial »
« Upgrading ace-jump for avy
Related Posts
A few paredit keys that take over the world in writing
Fill and unfill paragraphs with a single key in keybind
Disable Mouse only inside Emacs in keybind
Content © 2019, All rights reserved. Icons under CC3.0.