Preparing to work with Emacs

Emacs is a high-powered text editor which, while not particularly pretty, is extremely useful for editing ATF files, managing projects and writing ESP portals. On this page we describe how to obtain, install and configure it for Oracc work.

Obtaining Emacs


It is best to install the DejaVu fonts before installing ATF mode; see the fonts page [visitor-fonts] for further information.

Downloading and Installing ATF Mode and friends

For Unix and Mac OS X users

  1. Download the Emacs lisp files in the archive [/downloads/].
  2. Unzip the archive to extract the files in the directory or folder where you want them to live. It is simplest to extract into your home directory.
  3. Locate your .emacs file; this will be in your home directory and it may be hidden. It is possible that it may not exist, if your Emacs installation creates it on demand when needed to store configuration options. To locate this file it is easiest to use Emacs: type ctrl-x ctrl-f and enter the filename as ~/.emacs. If the file does not exist, Emacs will create it.
  4. Edit your .emacs file to include the following line:
    (load-file "~/oracc-init.el")
    (The file name will be different if you do not extract the files to your home directory or Application Data under Windows).
  5. Save your .emacs, exit Emacs and restart.

For Windows users

If you already have a working Win32 Emacs installation on your machine and want to upgrade, you must first delete your existing ATF Mode files and friends, and then reinstall them after you have installed the new Win32 Emacs. If you do not do this, you are likely to find that Win32 Emacs fails to start up properly.

You need to download an extra few files to optimise the functionality of EmacsW32.

  1. Download the Emacs lisp files in the archive [/downloads/].
  2. Unzip the archive to extract the files in the directory or folder where you want them to live.
    • On Windows XP EmacsW32 considers the home directory to be (for user 's') c:\Documents and Settings\s\ or c:\Documents and Settings\s\Applications Data\ (depending on the exact version of XP; you will need to experiment). So if your Windows XP user name (or login name) is Hammurabi, your home directory will be c:\Documents and Settings\Hammurabi\ (or c:\Documents and Settings\Hammurabi\Applications Data) by default.
    • On Windows 7, your home directory will be (for user 's') c:\Users\s\AppData\Roaming\ . Note that the folder AppData is hidden: if you do not see it, you can make it visible by selecting the 'Show hidden files, folders, and drives' option in the Folder Options (tab View) of the Control Panel.
  3. Download the zipped file of add-ons for EmacsW32 [/downloads/] and copy it to your home directory. Unzip it.
  4. Leave the unzipped .emacs file in your home directory.
  5. Move w32-winprint.el (an old program by Lennart Borgman that enables printing with Notepad), recentf-ext.el (a program by Rubikitch that allows you to handle 'dired' buffers) and pc-bufsw.el (a program by Igor Boukanov that enables moving between buffers with Ctrl-Tab, Ctrl-Shift-Tab) to c:\Program Files\Emacs\site-lisp\ . On Windows 7 this will be C:\Program Files (x86)\Emacs\site-lisp\

Tramp and Emacs on Windows

Windows needs additional programs to enable Tramp to work effectively, but installing them is not hard:

  1. Install PuTTy from the PuTTY Download Page []. Use the Windows installer that installs everything.
  2. Edit your Windows path to include C:\Program Files\PuTTY or (for Windows 7) C:\Program Files (x86)\PuTTY:
    1. Left-click on My Computer
    2. Select Properties
    3. Go to the Advanced tab
    4. Click Environment Variables button
    5. Scroll down to the Path variable in System Variables field
    6. Double-click Path variable
    7. Append your PuTTy install directory to the Variable value field, for example
      ;C:\Program Files\PuTTy (or, for Windows 7, ;C:\Program Files (x86)\PuTTy), to the end of the line. Remember the semi-colon first - It's important.
    8. Apply settings, get back to desktop.
  3. Open the file .emacs by typing C-x C-f and answering ~/.emacs at the Find File: prompt. Now add the following line to .emacs and then save the file:
    (setq tramp-default-method "plink")
  4. Restart Emacs.

Initialize the secure connection

Once you have installed Emacs (and PuTTy if appropriate) you need to set up your connection to the Oracc server. Generally speaking, you will only need to do this once.

On either PC or Mac, you will then see a message that looks something like this:

The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 7b:e5:6f:a7:f4:f9:81:62:5c:e3:1f:bf:8b:57:6c:5a
If you trust this host, hit Yes to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, hit No.
If you do not trust this host, hit Cancel to abandon the

Type yes and press return to set up the connection to the Oracc server. Next:

Once you have entered this information and pressed return, you will see a prompt that says something like [proj@oracc] $. You should now log out by typing logout and pressing return. You can now quit PuTTy/Terminal and proceed to the next relevant section on this page.

23 Aug 2014 osc at oracc dot org

Ruth Horry & Eleanor Robson

Ruth Horry & Eleanor Robson, 'Preparing to work with Emacs', Oracc: The Open Richly Annotated Cuneiform Corpus, Oracc, 2014 []

Back to top ^^

Released under a Creative Commons Attribution Share-Alike license 3.0, 2014. [] [] []
Oracc uses cookies only to collect Google Analytics data. Read more here; see the stats here []; opt out here.