PicoLisp Wiki Markup Syntax

The Wiki Markup has a very simple syntax. It always starts with a single character (that specifies the type of markup) followed by an opening brace, and extends till the matching closing brace.

Currently, the following markup types are supported:
   3{Heading}                 Heading (level 3)
                              Levels 1 .. 6 are allowed

   &{3}                       Insert 3 line breaks
   &{-3}                      Insert 3 line breaks, clear float style

   /{italic}                  Italic font
   !{bold}                    Bold font
   _{underline}               Underlined font

   *{                         Unordered list
      -{List item 1}             List items
      -{List item 2}

   +{                         Ordered list
      -{List item 1}             List items
      -{List item 2}

   <{content}                 Left-floating content (e.g. image, video)
   @{content}                 Non-floating content (e.g. image, video)
   >{content}                 Right-floating content (e.g. image, video)

   ={Doc Page}                Internal link to the document "Doc"
                                 The optional label text is "Page"

   ^{http://ext.org Text}     External link to "http://ext.org"
                                 The optional label text is "Text"

   :{code}                    'code' style

   :{                         Pre-formatted text

   \{                         Escaped brace

   #{comment}                 Comment

Quickstart PicoLisp Wiki

How to contribute to the PicoLisp Wiki? First, you need an account. Click on the Log in link, then press the Create account button on the next page and fill out the form.

Once you are logged in with you new account, go to the wiki section where you want to add something, e.g. the Articles & Essays page. Click on the edit link on top of the page.

Add a new internal link to the page that points to your (still non-existing) new article:

={myarticle This is a short description of my article}

Add a Summary for your change, have a look at the Preview, and when the new link looks fine, save the page.

Refresh the edited page and click on the new link. You will be offered to create the new (but still non-existing) page the link points to, i.e. you will be offered a form for your new page myarticle.

Write your article inside the form, using the syntax described above, don't forget to add a little Summary message like "Added my first article", have a look at the Preview again, and then save it.

Now your new article should exist in the wiki, and it should be accessible from the Articles & Essays page.

Picolisp Wiki Mode for Emacs

In the lib/el/ folder of the PicoLisp distribution, the file picolisp-wiki-mode.el can be found. It is a major mode for GNU Emacs, written in Emacs Lisp, that makes writing and editing articles for the PicoLisp Wiki fast and convenient. All elements of the PicoLisp wiki syntax can be inserted by using easy keybindings. The mode offers fontification and outline-navigation too. To use it, you have to first load the file with M-x load-file and then put the buffer you want to edit in picolisp-wiki-mode with M-x picolisp-wiki-mode.


Keybindings for inserting are grouped by prefixes based on their function. For example, commands inserting links and lists begin with C-c C-l, those inserting floating content with C-c C-f, all other inserting commands with C-c C-c. The primary commands in each group are described below. You can obtain a list of all keybindings by pressing C-c C-h.

    ;; Element insertion
    "C-cC-l n" Insert Internal Link
    "C-cC-l x" Insert External Link
    "C-cC-l u" Insert Unordered List
    "C-cC-l o" Insert Ordered List
    "C-cC-l i" Insert List Item
    "C-cC-f l" Insert Left-Floating-Content
    "C-cC-f n" Insert Non-Floating Content
    "C-cC-f r" Insert Right-Floating-Content
    "C-cC-c k" Insert Line Breaks
    "C-cC-c 1" Insert Header 1
    "C-cC-c 2" Insert Header 2
    "C-cC-c 3" Insert Header 3
    "C-cC-c 4" Insert Header 4
    "C-cC-c 5" Insert Header 5
    "C-cC-c 6" Insert Header 6
    "C-cC-c b" Insert Bold
    "C-cC-c i" Insert Italic
    "C-cC-c u" Insert Underlined
    "C-cC-c p" Insert Pre Block
    "C-cC-c c" Insert Comment
    "C-cC-c -" Insert Horizontal Rule (hr)
    ;; Visibility cycling
    "<tab>" Picolisp Wiki Cycle
    "<S-iso-lefttab>" Picolisp Wiki Shifttab
    ;; Header navigation
    "C-M-n" Outline Next Visible Heading
    "C-M-p" Outline Previous Visible Heading
    "C-M-f" Outline Forward Same Level
    "C-M-b" Outline Backward Same Level
    "C-M-u" Outline Up Heading

Many of the commands described above behave differently depending on whether Transient Mark mode is enabled or not. When it makes sense, if Transient Mark mode is on and a region is active, the command applies to the text in the region (e.g., C-c C-c b makes the region bold). For users who prefer to work outside of Transient Mark mode, in Emacs 22 it can be enabled temporarily by pressing C-SPC C-SPC.

Outline Navigation

picolisp-wiki-mode supports *outline-minor-mode* as well as *org-mode-style visibility cycling* for PicoLisp Wiki style headers. There are two types of visibility cycling: Pressing S-TAB cycles globally between the table of contents view (headers only), outline view (top-level headers only), and the full document view. Pressing TAB while the point is at a header will cycle through levels of visibility for the subtree: completely folded, visible children, and fully visible.

* Outline Navigation:

Navigation between headings is possible using `outline-mode`. Use C-M-n and C-M-p to move between the next and previous visible headings. Similarly, C-M-f and C-M-b move to the next and previous visible headings at the same level as the one at the point. Finally, C-M-u will move up to a lower-level (more inclusive) visible heading.

FIXME: different header levels are not yet recognized by the outine commands.


picolisp-wiki-mode supports fontification of PicoLisp Wiki syntax and of text marked-up by the Wiki syntax.

FIXME: Due to the often nested structure of wiki-syntax elements, the regexp used to recognize different elements of a wiki-buffer are quite complicated and do not yet work reliably - thus fontification is still a bit random at the moment.


23nov15   abu