This is a really simple mode to edit pages on Oddmuse wikis (such as EmacsWiki) using GNU Emacs.
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 (oddmuse-mode-initialize)
If you plan to edit EmacsWiki, continue reading.
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.
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’
.
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).
curl
for URL retriever. (deprecated)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")
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
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”?
e.g. Here [#1] is an example for a footnote is oddmuse. Footnotes: [: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
(please do not modify this section. I am trying to track all OddmuseMode contributors and their contributions just in case I need it).
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) oddmuse-use-always-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)