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:
Emacs-wiki was written by John Wiegley, and is currently being maintained by .
If your are interested in modes like emacs-wiki, you may also like to read TheEmacsWiki:MarkupModes
Up to date details on EmacsWiki are available at .
v2.40 - updated 01-Jul-2003 (the development branch is far more up-to-date, so grab this if you can!)
v2.38 - updated 24-Nov-2002
If you have any difficulties with the latest stable release, you can try this older version instead.
Download: emacs-wiki-2.38.el.gz
You can read about the changes in ChangeLog.old.txt - though this release coincides with CVS version 1.11, so anything above that is only available in the development release.
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.
You can either hit backspace to reopen the construct, or use C-c C-l to toggle the lisp or tags being marked up.
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 you 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).
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
.
Sure. Try these:
(defun emacs-wiki-preview-source () (interactive) (emacs-wiki-publish-this-page) (find-file (emacs-wiki-published-file))) (defun emacs-wiki-preview-html () (interactive) (emacs-wiki-publish-this-page) (browse-url (emacs-wiki-published-file)))
Currently tramp doesn't like trying to calculate the file modification differences between a local and remote host - so if you wish to publish an entire wiki, you'll need to keep it all locally or remotely.
I tend to publish individual files when I update them, rather than publishing in a batch, which works around this. I also bind C-x C-p to emacs-wiki-publish-this-file
.
An alternative work-around would be to comment out the modification check in emacs-wiki-publish
.
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.
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.
There is an emacs-wiki discussion list dedicated to discussion of emacs-wiki, planner and related modules. The details of this list are available .