This is a really simple mode to edit pages on Oddmuse wikis (such as EmacsWiki) using GNU Emacs.



  1. Visit, edit and post Oddmuse wiki pages
  2. Basic font lock (syntax highlighting) support is available.
  3. Basic and naive new page detection (a short warning displayed on top of the buffer)
  4. Easily mark a page for deletion (oddmuse-delete)
  5. Easily redirect pages (oddmuse-redirect)
  6. SGML tag support


Add the file to your LoadPath, and add the following to your InitFile:

(require 'oddmuse)
(setq url-proxy-services '(("http" . "your.proxy.host:portnumber")) ; if needed

If you plan to edit EmacsWiki, continue reading.

Avoiding the captcha in EmacsWiki

Some wikis, such as EmacsWiki, use a text captcha to protect pages from being edited. The following code bypasses this test:

(add-hook 'oddmuse-mode-hook
          (lambda ()
            (unless (string-match "question" oddmuse-post)
              (when (string-match "EmacsWiki" oddmuse-wiki)
                (setq oddmuse-post (concat "uihnscuskc=1;" oddmuse-post)))
              (when (string-match "OddmuseWiki" oddmuse-wiki)
                (setq oddmuse-post (concat "ham=1;" oddmuse-post))))))


Use ‘M-x oddmuse-edit’ to get started. Use EmacsWiki as the wiki and SandBox as the page to edit. ☺

Use ‘C-c C-o’ to follow links, use ‘C-u C-c C-o’ to specify the target page yourself, and use ‘C-c C-c’ to save changes.

You can use ‘M-x oddmuse-post’ in any buffer. It doesn’t have to be in Oddmuse Mode.

Note: if post doesn’t work, check if you should use the captcha-bypassing code above.

Emacs Lisp code

At the bottom of oddmuse.el is the following code that bootstraps itself to the EmacsWiki:

(emacswiki-post "oddmuse.el")

From the end of the line just press ‘C-x C-e’.

oddmuse with Emacs 21

Current oddmuse.el uses url.el which is a standard library of Emacs22. If you use Emacs21, use oddmuse-curl.el instead. It requires #curl# (a command-line http client, amongst many other things).


If you use oddmuse-curl.el on Windows, you’ll need to install curl and use a decent shell for ‘shell-command-on-region’, like:

(setq explicit-shell-file-name "cmd.exe")
(setq shell-command-switch "/e:4096 /c")

Patches & Ideas

OddmuseMode is now hosted on savannah and is using Bazaar as its DVC.

So, in order to submit patches, bugs or anything else related to OddmuseMode, please try to use as much as you can savannah’s services.

Project page: http://savannah.nongnu.org/projects/oddmuse-el

integration with footnote mode

Wouldn’t it be cool if one could use the usual footnote-mode commands to create footnotes in oddmuse page, if they are not too “unwiki”?


Here [#1] is an example for a footnote is oddmuse.


[:1][1] no, it's actually here.

If we really wanted footnotes, we should support them better. In fact, there’s an Oddmuse extension that does just that. I just didn’t install it on this site. And to be honest, I see no need for them on the web: I believe footnotes belong to the world of print instead of the world of hypertext. See the Style section in Community:FootNote. – AlexSchroeder

Previously installed patch

(please do not modify this section. I am trying to track all OddmuseMode contributors and their contributions just in case I need it).

Primitive imenu support

This patch provides ImenuMode support to Oddmuse by creating entries for each heading. A better implementation would make the menu hierarchical. – AaronHawley

--- oddmuse.el	2009-02-22 18:22:58.000000000 -0400
+++ oddmuse.el	2009-06-11 10:25:42.000000000 -0400
@@ -228,6 +228,9 @@
 (defvar oddmuse-revision-check-regexp "^\\(generator\\|last-modified\\|revision\\).+"
   "A revision check regexp used to show prompt.")
+(defvar oddmuse-imenu-regexp "^\\(=+\\)\\s-*\\(.*?\\)\\s-*\\1"
+  "A regular expression for headings to be added to an index menu.")
 (defvar oddmuse-minor nil
   "Is this editing a minor change ?")
@@ -287,7 +290,9 @@
        (set (make-local-variable 'oddmuse-minor)
-  (setq indent-tabs-mode nil))
+  (setq indent-tabs-mode nil
+	imenu-generic-expression
+	(list (list nil oddmuse-imenu-regexp 2))))
 (autoload 'sgml-tag "sgml-mode" t)

CategoryHypermedia CategoryOddmuse