aboutsummaryrefslogtreecommitdiff
wiki.el - an Emacs mode for editing and browsing wiki files

wiki.el - an Emacs mode for editing and browsing wiki files

NOTE: this project is very much WIP.

Intro

wiki.el is an Emacs wiki mode for editing and browsing wiki files. There are several goals and areas of emphasis that differentiate it from other packages handling wiki.

First, it aims at a unified approach to various wiki markups and engines. On the markup front it will support standard or default markups of various wiki engines, as well as standalone markups like creole.

On the engine front it will support fetching and browsing wiki titles from various engines, as well as locally. Down the road we would like to develop a minor mode that can help with link navigation and browsing for non-wiki markups like markdown and rst. It remains to be determined whether submitting edited wiki entries directly from emacs is feasible under this unified approach.

Second, it aims to be close to the Emacs core, including not only using as many builtin features as possible and needed, but also working in a similar way to core packages. Specifically, an org-like set of navigation and editing features belongs to the second category.

As a non-goal, wiki.el does not try to come up with its own markup rules or languages, nor does it attempt to export wiki files to other formats.

Currently supported features:

  • Font-locking for basic mediawiki markups to the extent that Wikipedia titles are readable: headings, emphasis, linking, reference, etc.
  • Fetching and link jumping work for mediawiki, oddmuse and moinmoin sites. Files are saved locally, that may be used for caching.
  • The handling of local wiki files also allow maintaining a local wiki with interlinking with no remote sites.
  • Outline and imenu integration.

Install and use

Clone, require, M-x:

git clone https://g.ypei.me/generic-search.el.git
git clone https://g.ypei.me/wiki.el.git

Assuming you have cloned into dirs under ~/.emacs.d/lisp, then

(add-to-list 'load-path "~/.emacs.d/lisp/generic-search.el")
(add-to-list 'load-path "~/.emacs.d/lisp/wiki.el")
(require 'wiki)

Some entry points:

  • wiki-<site-name>-fetch: fetch a title from a wiki site. These functions are defined by the macro defun-wiki-fetchers, for all sites in the alist wiki-sites. For example
    • M-x wiki-wikipedia-en-fetch RET Emacs RET
    • M-x wiki-parabolawiki-fetch RET Installation Guide RET
    • M-x wiki-libreplanet-fetch RET Activism Guide RET
    • M-x wiki-emacswiki-fetch RET SandBox RET
  • wiki-open-url: fetches a title from a url. Example:

Prior Art

EmacsWiki has a list of wiki modes, classified under two categories:

  1. The first kind allows you to download a page from a remote wiki, edit it using Emacs, and submit it back to the wiki.
  2. The second kind allows you to treat local files as a local wiki without using a browser. Usually these modes allow you to publish the local wiki as a set of static HTML pages.

wiki.el mainly falls under the first category, though it cannot be used for submitting back to wiki yet. Unlike wiki.el, the modes listed under the first category are mostly specialised to one engine / markup only.

wiki.el also supports editing local files as a local wiki, with native linking support, though it does not aim to contain features for exporting and publication.

Copyright and contact

wiki.el is maintained by Yuchen Pei <id@ypei.org> and covered by GNU AGPLv3+. You may find the license text in a file named COPYING.agpl3 in the project tree. The project is intended for eventual publication in the GNU ELPA, which requires copyright assignment to the FSF for contributions.