I want to be able to do all my creative writing in a single, plain text environment. Org-mode provides outlining and organization, so what’s next? Well, org-mode is an Emacs major-mode and Emacs, like most text editors was written with programmers in mind. Emacs only added a real word wrap (visual-line-mode) with the last version, an absolute must have for a writer. But printing from Emacs doesn’t do proper word wrapping. So, I dug around and found GNU enscript, a printing program that takes plain text and outputs to a postscript printer with word wrap and lots of other command line options that give me what I want.
Once I nailed down the options (margins, word wrap, extra vertical space between each line, page numbers where I wanted them,etc) I wrote a function (defun) that automated printing with enscript. I also reassigned a key combination and put both in my .emacs (config file). Now when I want to print all I need to do is highlight the text region and press Shift <print>.
I use org-mode to export to Latex and get a professionally typeset copy that’s far superior to anything you can get using a word processor. The latest version of org-mode can export to Open Office / LibreOffice format and if I wanted, I could save to Word format. I use org-mode to export to html and with a few tweaks to the html source and a run through kinglegen, I have a file that can be sideloaded into my Kindle. But for draft copies, I export as plain text and use enscript to print. The graphic at the top of this post is an example of a plain text printout. All this from plain text files that can be read and edited with any text editor.
So what’s next? I need to add some ‘rules’ and tools to my org-mode creative writing environment. I’ll keep the actual story text at the top of the outline with story or chapter as the top level headline then use the next level down for scenes. That’s it — two levels. Then I can use the rest of the outline headings further down for character sketches, plot ideas, notes or whatever strikes my fancy to keep things organized. It’s easy to export only the text but I don’t want headings so what to do?
I solved that issue earlier this evening when I built a regular expression (regexp) that can find all the scene headings:
Org-mode uses asterisks to mark headlines, with first level *, second level ** and so on. The above regexp finds the entire line for each scene heading.
I can replace each instance with the latex markup (\bigskip) that puts extra vertical space between scenes. And I can also insert the Latex markup for no indent for the first paragraph of the new scene. Sounds complex but it’s not, especially since I’ll write a function to automate the process once I have it ironed out to my satisfaction.
Now that I know I can tweak org-mode, I’ll lay off for awhile and do some serious writing instead.