/moinrpc-mode

An Emacs powered moinmoin wiki client

Primary LanguageEmacs LispMIT LicenseMIT

MoinRPC mode

This mode enables Emacs to communicate with moinmoin wiki.

Currently this is in alpha stage.

You can navigate several wikis,

./docs/wiki-list.png

and can list recently changed wiki pages, open a certain wiki page,

./docs/wiki-server-main.png

./docs/recent-changes.png

and can open a wiki page, edit it and save it to wiki server.

./docs/wiki-page.png

Prerequisite

You must own a MoinMoin wiki server.

MoinMoin Wiki XML-RPC action is disabled by default, so you should configure it to provide a XML-RPC endpoint action. (cf. XML-RPC section of MoinMoin official site)

In short, just add below code on your LocalConfig class can be found in wikiconfig.py file.

actions_excluded = multiconfig.DefaultConfig.actions_excluded[:]
actions_excluded.remove('xmlrpc')

Getting Started

Run M-x moinrpc-main-page.

Then you will see an empty main page. Next, type n to add a new wiki setting. Type your wiki name, XML-RPC endpoint url (typically <your wiki domain>?action=xmlrpc2, number 2 means WikiRpc v2), username, password.

(This mode doesn’t store your password but an access token which is issued by server.)

You can find configuration file on <emacs.d directory>/remote-moin

You can see a new wiki with a hyperlink is displayed on moinrpc-main-page. Open any wiki page by clicking the wiki name. If you installed helm, you can see all page list of your wiki for find-file.

Select a wikipage, then a new buffer will be opened with content. Edit the page and C-x C-s to save to wiki server. Run C-x C-f to open other wikipage.

Features

  • Create or Edit wiki page
  • List of all pages
  • Paste image to a page

Keys

  • C-c C-n: Register a new wiki
  • C-c C-f: Open page or create a new one
  • C-x C-f: Open page or create a new one (using Helm)
  • C-x C-s: Save page
  • C-c C-o: Open a wikilink which is cursor on.
  • C-c m r: Search backlinks of current page
  • C-c m s: Serach pages
  • TAB: fold/unfold sub-tree headings

Alternatives

There are some other modes for moinmoin supports:

  • moomin-el
  • moinmoin-mode

To-do [10/17]

  • [X] C-c C-o: follow a WikiLink
  • [X] User friendly wiki setting
  • [X] Recent changes
  • [X] Attachment handling (put, get, list, delete)
  • [X] Find reverse links of a page
  • [X] Search page
  • [X] C-c C-l: insert wiki link with helm page search
  • [X] Align table
  • [X] Paste clipboard image to wiki page (upload it to page attachment and insert embed link)
  • [X] Conflict detection (compare local and remote page version before save and give diff when it conflicts)
  • [ ] Support template page. Load template page from new or existing page
  • [ ] C-j to complete a helm candidate
  • [ ] Syntax highlighting (already there is a nice moinmoin-mode but it contains some error)
  • [ ] Render page to HTML and display it on eww
  • [ ] Display embeded image
  • [ ] Render org-mode markup
  • [ ] Something like org-babel, execute block and attach output file

Change logs

Unreleased

  • Detect page version conflict of a wiki page between local and remote

v1.1.0

  • #19 add search and backlinks (#21)
  • #22 align table width (#23)

v1.0.2

  • #6 refactor: remove unnecessary `*moinrpc-content-provider*` (#7)
  • #8 refactor: separate layers (#9)
  • #10 refactor: match xmlrpc endpoint name (#11)
  • #12 add some more xmlrpc endpoints (#13)
  • #14 add `moinrpc-insert-wikilink` (#15)
  • #16 simplify buffer-local variable name (#17)
  • add wiki front page
  • #18 enhance wikilink detection (#20)

v1.0.1

  • #2 add recent changes (#3)
  • #4 add attachment management (#5)

2018-09-07

  • Let moin-page-mode derived from outline-mode
    • Now it recognizes wiki headings
    • Tab key on a heading fold/unfold sub-tree