I want to use Emacs to write prose (specifically, fiction).

I have used Scrivener and Ulysses in the past but I am not happy with them. I want to try Emacs, but don't know how to replicate the workflow I am used to.

I use writeroom-mode to get a distraction-free environment, but it's just one piece of the puzzle. I like the way Ulysses and Scrivener allow you to focus on a chunk of text, and I'd like to know how to replicate this functionality. I would like org-mode or another outliner to allow me to focus on a piece of text and hide the rest. Ideally, I'd like to have a sidebar (like Ulysses), in which I can arrange pieces of text manually, like in this screenshot:


PS I have read the "Emacs for Writers PDF but it doesn't address the need to organize and structure your text.

  • 4
    Please clarify your post with a question about what you actually need (better still, ask one discrete question per post and do multiple posts if necessary). org-mode does outlining, which allows you to focus on particular pieces of text and move the rest around. Narrowing removes text from the screen.
    – Dan
    Commented Jul 8, 2015 at 14:22
  • 1
    This could be a candidate for one of those "big-list" questions :) (there was a discussion on Meta regarding whether or not this kind of questions are appropriate on SE: meta.emacs.stackexchange.com/questions/305/… ). More on topic: you should probably revisit Org mode. It's huge and in terms of structuring text, it knows to do a lot. Emacs is, however, lacking in understanding the grammar of the text you write. Spellchecking is all it has to offer in this regard.
    – wvxvw
    Commented Jul 8, 2015 at 15:34
  • 1
    @lawlist writers have always used "sidebars" in the form of notes. this is just the digital version of it.
    – Jason Mirk
    Commented Jul 8, 2015 at 15:43
  • 2
    Here is an interesting article entitled How to write a book in emacs. masteringemacs.org/article/how-to-write-a-book-in-emacs As an example to the elisp and time-investment, I spent a couple of days to just get basic movement to mimic the various word processors that I had used over the years in my profession(s) -- e.g., left/right word, up/down paragraph, and delete word. The nice thing about Emacs is that it is perfect for anyone with a little to a lot of Obsessive Compulsive Disorder, who need things to be a specific way and it must be just right, not just about right.
    – lawlist
    Commented Jul 8, 2015 at 16:12
  • 1
    Scrivener has too much stuff and you dont write in plain text as far as i remember. Ulysses 3 is pretty good but it crashes a lot. Also, you cant split the buffer, move paragraphs of text around without using the mouse and tons of other things that you end up missing once you know they exist.
    – Jason Mirk
    Commented Jul 9, 2015 at 3:54

3 Answers 3


Here is what I take to be your goal:

  • The ability to focus on a particular chunk of text while getting the rest of it out of your way,
  • The ability to move big chunks of text around quickly.

This solution uses only out-of-the-box Emacs functionality:

  • org-mode
  • narrowing
  • split windows
  • indirect buffers

First of all, if you write your document in org-mode (or any mode that makes use of Emacs' outline facilities), you'll be able to structure your document with headings, sub-headings, etc., and then hide or show the bodies of those elements. For prose, you may find it helpful to be very elemental: a header for a chapter, a sub-header for a section, a sub-sub-header for a subsection, all the way down to a sub-sub-...-header for each individual paragraph.

Second, even though org-mode will allow you to hide the bodies of your headers and focus only on the body in front of you, it will leave the section headers on the screen. You may or may not find that distracting. If you do, you can narrow the buffer just to that header (making all of the rest of the headers disappear temporarily from view) and then widen again when you want to see the other text again.

Third, to get an easy outline view and the ability to move text around quickly, you can use a combination of split windows and indirect buffers. Make your Emacs frame wide enough to accommodate two windows (see this post for frame/window terminology). Do M-x split-window-horizontally to get two windows side-by-side in your frame. In the window that has your document, do M-x clone-indirect-buffer.

Now you have two linked copies of the same document in two different buffers. Put them in your two windows. Although they will both contain identical text, you can make them look different in the two windows.

One very useful way to use this facility is to have a main editing window in which you actually enter and edit your prose, and use the other window as your outline view: hide the bodies to show only the headers in a given section/subsection/whatever to give yourself an overview of the document's structure. You can then move chunks around quickly -- if you're using org-mode, M-<up> and M-<down> run org-metaup and org-metadown, respectively, which, in this context, will move subtrees (a header and everything below it) up or down in the document.

  • 1
    this is almost perfect. I wrote some elisp and customized everything to my taste too. Wasn't that hard after all. One more thing would be how to be on the sidebar, hit a key and make it load on the main buffer. But I guess that's a different question.
    – Jason Mirk
    Commented Jul 9, 2015 at 13:25
  • 2
    You might also enjoy clone-indirect-buffer-other-window. Commented Jul 9, 2015 at 14:14

I think this is a great question. I'm sure there are tons of super helpful modes that fiction writers don't know they need. I happened upon palimpsest-mode by accident, but now I couldn't live without it. I'd love to see what packages other fiction writers find useful.

Here are some that I use every day:

  • palimpsest-mode. Sends selected text to the bottom of the file. I use it probably 20 times an hour.
  • Deft. Incremental search of text files in a directory, similar to @ttscoff's nvALT.
  • Olivetti. Make the text area smaller and nicer.
  • Fountain. If you're a screenwriter.
  • Helm-swoop for finding things quickly.
  • Auto-capitalize. No need to write capital letters yourself.
  • Org-pomodoro to keep yourself on track.
  • wc-mode to count words if you need to.
  • And most of all, org-mode to outline. My trick is that I write notes to myself (e.g. "this section needs a better intro") using org-mode comments, so they don't get included when I export. Oh, and use the command org-narrow-to-subtree to focus just on the section you're working on.
  • 2
    This is excellent! I see myself using palimpsest-mode thousands of times and org-narrow-to-subtree too!
    – Jason Mirk
    Commented Jul 9, 2015 at 3:46
  • 1
    I also found this which seems to replicate what I was looking for: github.com/titaniumbones/org-writers-room but didnt get it to work properly yet. This is interesting too: github.com/theironsamurai/scribemacs
    – Jason Mirk
    Commented Jul 9, 2015 at 3:48
  • 1
    As far as I know, org-writers-room doesn't work yet. It's a great idea but someone needs to write the code. Commented Jul 9, 2015 at 4:13
  • 1
    Any volunteers? Commented Jul 23, 2015 at 3:33

This answer is not exhaustive, but I cannot post this in the comments because it has an image. May the table of contents you are talking about look something like below?

enter image description here

Another ad hoc way to have an outline is to run M-s o^\s-*\* (which is equivalent to M-xoccur). Even though this isn't a proper outline, more often than not, I find this to be an adequate solution for the problem of locating and navigating sections of the document.

  • 1
    Yes i tried speedbar but i don't like that it's a floating window. It seems outdated.
    – Jason Mirk
    Commented Jul 8, 2015 at 20:25
  • 2
    @JasonMirk there was a project to make Speedbar a buffer rather than a window, but it's hard to get it to work "properly" due to various buffer commands that may eventually bury it or replace the contents. There used to be buffer configuration managers, like ECB, which made a fixed buffer layout and could also display the outline in the fixed location, but my experience of working with ECB is that more often than not it gets in my way. But maybe something like that will work for you, if you don't need to manipulate buffers too often.
    – wvxvw
    Commented Jul 8, 2015 at 20:46
  • 1
    emacswiki.org/emacs/SrSpeedbar this is the project I was talking about.
    – wvxvw
    Commented Jul 8, 2015 at 20:47
  • 1
    If the speedbar concept is something the original poster is fond of, then it may be worth investing time to make it behave as the original poster would like. It took me about an hour (with two years elisp monkeying under my belt) to make the library my own custom setup, strip out all that frame stuff, and turn it into an on demand buffer that can be displayed in any window. This is where the time investment comes in when dealing with Emacs -- you find something you like (i.e., can work with) and change it to whatever suits your exact needs. E.g., generate-speedbar-noselect+display
    – lawlist
    Commented Jul 8, 2015 at 22:55
  • I haven't used it, but what about neotree? Commented Jul 9, 2015 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.