**This is an old revision of the document!**

screenwriter.el

The most universal and simple solution is Screenwriter.el a fork of Screenplay.el by Vance L. Simpson. This is an excellent screenplay (major) mode for GNU Emacs that is easy to use, efficient, and will work on any and every platform that the ubiquitous and revered GNU Emacs works on.

If you are running a default install of Slackware, as Slackermedia recommends, then you will have Emacs installed already. If you have not installed Emacs, you will find it in the e package set.

Installing .el files for Emacs is as simple as placing the .el in a user-owned ~/elisp directory, and then adding that ~/elisp directory into Emacs' load directory if it is not already there:

$ mkdir ~/elisp
$ wget
http://cvs.savannah.gnu.org/viewvc/*checkout*/screenwriter/screenwriter/screenwriter-1.5.tar.bz2
$ tar -xf screenwriter-1.5.tar.bz2
$ mv ./screenwriter-mode/screenwriter.el ~/elisp
$  echo "(add-to-list 'load-path \"~/elisp\")" >> .emacs 
$ echo "(require 'screenplay)" >> .emacs

Start emacs and press meta x, and type screenwriter-mode. You are now in screenplay-mode and can start writing in proper screenplay format. Read the comments in ~/elisp/screenplay.el for instructions on how to use the application, or read on for use and optimization, Slackermedia style.

Using and Optimizing Screenwriter-mode

There are three elements in screenplays:

  • Slug Lines (scene headings, such as INT. CAFE - NIGHT)
  • Screen Direction (blocks of action text, wherein the screenwriter describes what a character is doing physically during a scene)
  • Dialogue (heavily indented blocks of text in which characters speak)

Accessing each element is done with keyboard commands that can be easily remembered with the mnemonic SAD:

  • Control-c s Slugline
  • Control-c a Action (Screen direction)
  • Control-c d Dialogue

Additionally, you can use Control-c t to insert Transitions (indented and capitalized blocks for CUT TO:, FADE IN, FADE OUT, and so on).

Whitespace is handled for you, so there is no need to place a blank line between the actor's lines, or between a slugline and the beginning of the action, and so on.

Note

Alternate keybindings for each element type centers around the tab key:

  • tab return Slugline
  • tab tab return Action
  • tab tab tab return Dialogue
  • tab tab tab tab return Transition

Streamlining Screenwriter-mode

Make screenwriter-mode a quicker launch from within emacs by adding a global keyboard shortcut for it, and defining the expected file suffix:

; a quick and easy way to enter screenplay-mode

(global-set-key (kbd "<f5>")
'screenplay-mode)

; open any file with a .scp or .screenplay suffix in
screenplay-mode

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

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

Save your .emacs file and launch Emacs. Pressing F5 should place you in screenplay-mode. Pressing control-c s will start a new slugline for you, control-c a an action block, and control-c d a dialogue block.

Save a sample screenplay (sample.scp, for example), and then close Emacs. Open Emacs again and open a file via the File menu or by using the control-x control-f key sequence. Open your sample.scp and note that Emacs opens it in screenplay-mode.

In Dolphin, you can right-click on sample.scp and choose to Open With Emacs, and it will be opened in screenplay-mode in Emacs. However, default KDE uses the much faster single-click method, so it would be nice if a single click on any .scp or .screenplay file would open prompt KDE to launch Emacs, and Emacs in turn to open in screenplay mode.

Emacs is already set for .scp and .screenplay, so only KDE now needs to be configured:

  1. Open System Settings; open it and select the File Associations panel.
  2. Click the Add… button on the left of the panel to add a new file type.
  3. Place it in the Text category. It will be placed at the bottom of the text list; select it and configure it on the right side of the panel.
  4. You may give it a custom icon, such as something from the Oxygen Icon set that suggests movies or the default Emacs Document icon, and define the file extension as both *.scp and *.screenplay.
  5. Give the Application Preference Order a sensible set of applications. The documents are in plain text, so they may be opened in any text editor; Emacs as the first is obvious, Kate and KWrite are likely candidates for fallback applications.
  6. Click the Apply button in the lower right corner to save your configuration.

Now if you click on sample.scp from Dolphin, KDE will open it in Emacs, and Emacs will enter screenwriter-mode.

You now have a screenplay authoring program for Slackermedia, and quite likely for any other platform you possibly run.