#title Emacs Wiki
emacs-wiki.el is a wiki major mode for emacs, which aims for implicit and
natural markup.
(see the WikiMarkup rules, or this page's source: [[EmacsWiki.txt]])
Some of its features include:
- Managing documents within emacs, with font-lock based markup, inlined
images, RET to follow hyperlinks, and programmable completion of links.
- Support for publishing to a variety of formats, such as HTML, or (with the
help of extension code) latex or texinfo.
- With httpd-serve.el, support for serving published wiki pages
directly from emacs
- Projects, which allow you to apply particular preferences against a
subsection of pages
Emacs-wiki was written by [[http://www.gci-net.com/~johnw/EmacsResources.html][John Wiegley]], and I am currently maintaining it. His
page contains a number of other useful projects, such as
TheEmacsWiki#PlannerMode, which integrates with emacs-wiki.el.
If your are interested in modes like emacs-wiki, you may also like to read
TheEmacsWiki#MarkupModes
* Release candidate
**v2.39-rc9 - updated 17-Mar-2003**
This is ready for beta testing as the next stable release.
Download [[devel/emacs-wiki.el.gz][emacs-wiki.el.gz]], or read [[ChangeLog.txt]].
** Changes
- Added a new variable, =emacs-wiki-inline-relative-to=. See the FAQ for more.
- Titles and headers are now font-locked.
- A new variable =emacs-wiki-publishing-transforms= which can
change the location files are published to - so you don't need to publish
all into the one directory. Combined with tramp, you can use this for
publishing directly to your webserver:
(setq emacs-wiki-publishing-directory "/webserver:/var/www/")
(setq emacs-wiki-publishing-transforms
((".*Wiki.*" . "emacs/wiki/\\&")
("EmacsWiki\\|WelcomePage" . "index")))
- Highlighting should be less prone to getting confused when stray * or _
characters exist in the page. Consequently, it's been made a bit stricter so
that for example: **match** will be made bold, but
** match** won't be.
- It tries to detect the HTML charset from the buffer's coding system now. If
your language choice isn't in =emacs-wiki-coding-map=, patches are
welcome.
* Previous stable release
**v2.37 - updated 24-Nov-2002**
Download: [[emacs-wiki.el.gz]]
You can read about the changes in [[ChangeLog.txt]] - though this release
coincides with CVS version 1.11, so anything above that is only available in
the development release.
* Contributions
If you're doing something interesting with emacs-wiki and would like to share
it with others, I'm happy to link to it here.
Wiki menus ::
Jean-Philippe Georget contributed a package which shows you how to create a
uniform menu across the different pages of your site. The package includes
a README and an example of the generated pages in webwiki and webwiki-css.
Grab it [[contrib/ewiki-menu.tgz][here]].
Auto-generated image galleries and file listings ::
Mark Triggs has a [[http://dishevelled.net/emacs-wiki.html][page]] dedicated to the elisp code he's written for
embedding in wiki documents. There's some nifty code here to generate pages
which would be laborious to create manually.
RSS syndication ::
Hugo Haas has written some [[http://larve.net/people/hugo/2003/scratchpad/RssForEmacsWiki.html][code]] to publish an RSS document each time you
publish a wiki project.
* FAQs
** How do I open an extended link or edit a lisp tag?
You can either hit backspace to reopen the construct, or use C-c C-l to
toggle the lisp or tags being marked up.
** How do projects work?
Projects allow you to organise your information into logical "units". For
instance, this web site is a wiki project with a different publishing
location and source directory, with different publishing headers and footers.
My work wiki has a smaller fill-column. An example to get your started:
(setq emacs-wiki-projects
`(("default" . ((emacs-wiki-directories . ("~/wiki"))))
("work" . ((fill-column . 65)
(emacs-wiki-directories . ("~/workwiki/"))))))
You can use C-c C-v to switch projects, or use interwiki links (see
WikiMarkup).
** How do I use the TAB key in emacs-wiki?
TAB is bound by default to move to the next wiki link. If you just want to
insert a single tab, you can type =C-q TAB=. Otherwise you can change the
definition of tab in =emacs-wiki-mode-map=.
** How do inlined images work? What about with publishing?
To inline an image into your document, use something like
[[./myimage.png]]
The ./ is necessary because otherwise it won't be recognised as a link. But
don't put the image in the same directory as all your wiki files, since then
emacs-wiki will try and publish the image when it publishes your files (and it
doesn't yet know the difference between a normal file and an image), so you
end up with =myimage.png.html=.
So say you create an "images" subdirectory. Your link could then be:
[[images/myimage.png]]
By default, emacs-wiki looks in the publishing directory to find the images.
This makes sense when both the wiki files and publishing dir are on the file
system, but it is also possible to publish via tramp. If you want to do the
latter, set this variable to try and locate the images relative to the wiki
page:
(setq emacs-wiki-inline-relative-to 'default-directory)
The only remaining issue is how to get the images to be published when you
publish your wiki pages. At present, you can try the following lisp on your
=WelcomePage=:
(when emacs-wiki-publishing-p
(ignore (shell-command "scp -r images webserver:/var/www/")))
Or via FTP:
(when emacs-wiki-publishing-p
(ignore (shell-command "ftp ftpserver.domain.name << EOF
cd wikidir
mkdir images
prompt
mput images/*
EOF
")))
Every time you publish the project with C-c C-p the images will be updated.
** Can I define the header and footer in files?
Sure. Try something like:
(setq emacs-wiki-publishing-header "(my-publishing-header)")
(defun my-publishing-header ()
(if (file-readable-p "header.wiki")
(ignore (insert-file-contents "header.wiki"))
"this is the default header text, if the file can't be found\n"))
That will look for a file named 'header.wiki' in the same directory as the
wiki page, and insert it. If it doesn't exist, the default text is inserted
instead.
* Documentation
- Pages dedicated to emacs-wiki.el on TheEmacsWiki#EmacsWikiMode.
- [[http://www.emacswiki.org/cgi-bin/wiki.pl?AutoEncryption][Automatic encryption/decryption]] of wiki links
(progn (ignore
(when emacs-wiki-publishing-p
(with-temp-buffer
(shell-command "cvs log $el/emacs-wiki/emacs-wiki.el" t)
(write-region (point-min) (point-max)
"/plethora:/var/www/emacs/wiki/ChangeLog.txt")))
(set (make-local-variable 'de-wiki-backlink) "my Emacs page!/emacs/")))