Posts Tagged ‘editor’

Installing Emacs Muse on Windows XP

Saturday, March 14th, 2009

This post will deal with the installation of the GNU Emacs editor plus the Emacs Muse authoring/publishing environment running Windows XP.

Download & extract

GNU Emacs

First, obtain the latest precompiled Emacs binaries for Windows. Get it directly from the FTP location here, alternatively follow the link from the Getting Emacs guide. Download the latest zip-version marked bin; emacs-22.3-bin-i386.zip these days.

For the full guide on installing emacs on Windows, consult this guide.

After downloading, extract the Emacs zip-file to a permanent location on your computer, i.e. C:\Program Files\emacs, so that this folder directly contains the folders bin,etc,lisp and so on.

Muse

Second, download the latest Emacs Muse (hereafter only called Muse) zip-file. Get it directly from here, alternatively follow the link from the project’s home page here.

Extract the Muse zip-file to, for instance, C:\Program Files\emacs_muse.

Integration

Now it’s time to make include Muse into your Emacs installation/folder: Copy all contents of C:\Program Files\emacs_muse\lisp\ to C:\Program Files\emacs\lisp\.

The HOME environmental variable

We must now set up the .emacs init file, residing in your HOME directory. But first, we need to make sure you have HOME environmental variable. Check it by clicking Start->Run. Type in %HOME% and click OK. Does it open a folder? If so, notice the path of this folder. This is where we’re putting the .emacs init file. If you instead get an error, you must first set the HOME environmental variable:

Start->Settings->Control Panel->System->Advanced->Environmental Variables. In the upper field (user variables), press New. Name=HOME, Value=(whatever path you choose as your home folder. Make sure it exists!). OK x 2.

Editing the .emacs init file

Now that you have a HOME folder, open it: Start->Run. Type in %HOME% and click OK.

Create and edit a file named _emacs or .emacs, any one is good (.emacs is the original file name as used in Unix environments, but Explorer won’t let you create a file with filename starting with a dot, so therefore it’s easier to use the name _emacs). Put this contents into the file:


(setq load-path (add-to-list 'load-path "C:\Program Files\emacs_muse"))
(require 'muse-mode)
(require 'muse-publish)
(require 'muse-html) ;; and so on

For further contents regarding Muse in this file; see here under the heading “Getting Started”.

Testing

Now, start emacs by running the file: C:\Program Files\emacs\bin\runemacs.exe.

Create a new file with the .muse filename extension, (automatically puts emacs in muse mode) i.e. musetest.muse, and you’re set. Try typing something like (notice space bewtween asterisk and text in headings):


* Heading 1
** Heading 2

Test contents.

----

The end of the beginning.

… and notice that the two first lines (the headings) aquire different font weights. If they do; congratulations on your successful Emacs + Emacs Muse installation! If not, maybe you haven’t got emacs into muse mode. Try doing so by pressing Alt-x, then write muse-mode and hit return.

In the end, try publishing to HTML by hitting Ctrl-c Ctrl-t on the keyboard and follow the instructions in the “status field” in the bottom of the Emacs window.

Diving deeper

For diving deeper into muse, reference the project’s documentation:

References