Thursday, March 6, 2008

Muse: Emacs personal wiki

If you make a lot of notes, and want them to be linked and have basic formatting, Emacs Muse will be pretty helpful.

A lot of resources about Muse go on about how Muse can be used to write stuff and publish it to various formats, e.g. HTML, LaTeX, PDF, and so on. What seems to be downplayed is the simple ability to organise notes in a personal wiki, which was something I was curious about, since Muse was pitched as the successor of EmacsWikiMode. This is what I'd like to focus on.

I run Xubuntu, so I merely had to install muse-el via Synaptic, and I was up and running. But where to go from there?

First, since making a note/page in Muse makes a file, I made a directory to store those files, ~/muse/.

Then find a new file in ~/muse/, and give it ".muse" as the extension. This should put you into Muse mode, and you can get started on your wiki.


There's a whole Info manual for this stuff, but for the impatient, here's the stuff I use:

* Heading 1
** Heading 2
*** Heading 3

**more emphasis**
***even more emphasis***



Links resemble MediaWiki's style of double square brackets, and less the WikiWords style that's common elsewhere. It's fine because I like the former better anyway.

[[Yarg]] will link to Yarg.muse in the same directory.

[[Yarg][Alternate link text]] does the same as above, but with "Alternate link text" as the linked text.

Edit an existing link by putting the point over it, and typing C-c C-e. This will bring up two minibuffer prompts for the link destination and link text.

You can also mess with the link source directly by using C-c C-l, which shows the raw wiki text of the document in Emacs.

Like a regular wiki, you can link to notes/pages that don't exist yet, and just press RET to visit them. S-RET does the same, but in a new window.


Lists are simple enough:

- Item a
- Item b
- Item c
- Sub item a
- Sub item b

1. Blah
- Mixing it up
- With different lists
2. Haha

Just type the first list item manually, and use M-RET to add items to the list.

Use C-> and C-< to indent and outdent a list item respectively.

That should be all that's needed to get started with Muse in Emacs.

No comments: