Getting Started

On GNU Linux, BSD, and other Unixy Systems

If you're already running GNU Linux, you are either dirt poor or you value your data's freedom, or both. Welcome to the club!

You may also already be familiar with GNU Emacs, or you might not. Either way, getting started with Screenwriter-mode is as simple as installing Emacs, installing Screenwriter, and writing.

1. Installing GNU Emacs

Emacs is such an ubiquitous companion to Unix and Unix-like systems that usually your OS already has a very simple way of installing it, if it's not already installed.

So, the short version is to check first if you have Emacs installed:

$ which emacs

/usr/bin/emacs

If your terminal does return something like /usr/bin/emacs then yes, you have Emacs installed and can skip to the next step. Otherwise, you'll need to install Emacs. One way to do this is to download Emacs from gnu.org/software/emacs and install manually. The more common way is to use your distribution's package management software.

If you are using Slackware Linux, the command would be:

$ su -c 'slackpkg install emacs'

On Red Hat, Fedora, and many others:

$ su -c 'yum install emacs'

On Ubuntu, go to the Ubuntu One Store and search for Emacs.

On Linux Mint and other Debian-based distributions (this may also include you if you are an advanced Ubuntu user) you may use:

$ sudo aptitude install emacs

On Debian:

$ su -c 'aptitude install emacs'

On freeBSD and similar:

$ cd /usr/ports/editors/emacs23

$ su -c 'make; make install; make clean'

On Solaris, you can use the blastwave.org CSW or openCSW.org collection to install emacs.

2. Installing Screenwriter

Now that you have Emacs installed, you should launch it just to establish that it does indeed work. Launch Emacs from either your Application menu or from a terminal by typing emacs.

Emacs should start. Yes, it looks just like a normal application! Not at all the scary, for-advanced-users-only, confusing app that it's sometimes made out to be, is it?

Now that it's launched, quit it by selecting Exit from the File menu or hitting control-x and then control-c, in succession.

To install Screenwriter, you need to download it. So do that first. After you've downloaded it, you should have a screenwriter.tar.bz2 file somewhere on your computer; uncompress this by either right-clicking it in your file manager or using the terminal command

tar -xf screenwriter.tar.bz2

Next, create a directory in your home folder for all of your personal Emacs extensions. You can call this directory whatever you like; some people call it elisp.d, some people .elisp, others .elisp.d; whatever.

It doesn't matter what you call it but I call it elisp so that's what I'll use here.

$ mkdir ~/elisp

Then copy the screenwriter.el file into that directory:

$ cp ./screenwriter.el ~/elisp

Now it's installed. But wait! we need to configure a few things first.

3. Configuring Emacs

Create a file in your home directory (in fact it may already exist) called .emacs and then open it in a text editor:

$ touch ~/.emacs $ emacs ~/.emacs

In the .emacs file, you should add at least these lines:

(add-to-list 'load-path "~/elisp")

(require 'screenwriter)

(global-set-key (kbd ">f1<") 'screenwriter-mode)

(setq auto-mode-alist (cons '("\\.scp" . screenwriter-mode) auto-mode-alist))

(setq auto-mode-alist (cons '("\\.screenplay" . screenwriter-mode) auto-mode-alist))

Line by line, this means:

Save the file, close Emacs, re-launch it, and start writing screenplays.

4. Using Screenwriter-mode

If you've never used Emacs, you'll find it unique. Of course, "unique" hardly makes it difficult; in fact, its unique qualities are mostly the reasons people have loved and used Emacs for so long.

GNU Emacs existed long before popular word processors and graphic applications, so all of the control-c to copy and control-v to paste and control-s to save and similar shortcuts you might know? throw them out. They weren't even invented when Emacs came around.

Emacs uses sequential key shortcuts, logically divided into three main categories:

If you've never used Emacs, you should practise a little at the keyboard shortcuts. Try hitting control-x to see how it places you in a "command mode" (after you press control-x, look down at the bottom of your Emacs window and you'll notice that Emacs is patiently awaiting a second key press), and then control-f for "Find File", meaning you wish to open a new file. Then type in a new name for the blank document you about to open, and hit return.

Of course, you could also just go to the File menu and select "Open" or "Visit New File".

Now that you have a blank document, you can enter screenwriter-mode by pressing alt-x (in Emacs terms they call this meta-x, since the Alt key is not always called an Alt key on all keyboards) and then typing in screenwriter-mode.

Alternately, you could simply press F1, since we've configured Emacs with our .emacs file to assign F1 to opening screenwriter-mode.

Now that you are in screenwriter-mode, you can use the four screenwriter commands, which all use alt and a single mnemonic letter:

Usually, you do not need to press RETURN; when you have finished typing in a block of action, simply press alt-s d to enter dialogue mode, and after the dialogue is finished press alt-s a to get back to action, and so on.

To save your document, use control-x and control-s, or the File menu.

If formatting gets confused, then you can correct it with moving your cursor (with your arrow keys or mouse) to the block of text that is not properly formatted, and press control-u and then the format style you want to be applied to it, such as alt-s a or whatever. In other words, if you accidentally typed some dialogue in as action, move your cursor to the paragraph, press control-u to place you into correction mode, and then alt-s d to re-format.

That's about all there is to know about the basics of screenwriter-mode and GNU Emacs. Enjoy!