User:Riviera/mediawiki-and-emacs

From XPUB & Lens-Based wiki
< User:Riviera
Revision as of 17:09, 12 September 2023 by Riviera (talk | contribs) (Why can't I connect to pzwiki.wdka.nl/mw-mediadesign/api.php through Emacs using mediawiki.el?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

What would I like to do?

As a fond user of the GNU Emacs text editor I'm wondering if it's possible to browse and write directly to the XPUB and Lens-Based wiki from within Emacs. For this purpose I would use mediawiki.el.

Consider this paragraph…

… which was written in Emacs Org Mode and exported to a Mediawiki format using ox-mediawiki. How does this impact the published document? It sits in fragments, it crosses different writing platforms. On the other hand, I can revisit the text from within the Mediawiki editor and make changes to it. Nevertheless, there are several advantages to writing in Emacs:

  1. The file is local to my computer and can be saved without being published. On the Mediawiki interface saving a text is the same as publishing a text. Writing inside Emacs allows one to approach what which is shared online differently. Of course, It still leaves open the possibility of editing the document either online or off. Might this be good for bandwidth?
  2. I have keyboard shortcuts here which I do not have in other pieces of software. I can move across characters, words, lines and paragraphs dexterously. To implement such features into a web browser would require a lot of coding.

Familiarity and force of habit have a role to play in this context. I am used to writing in Emacs, I like its full-screen appearance, the transparency of the background, the font, the keybindings, syntax highlighting, the nuances of each mode. It's an essential part of how I write texts and I'd like to keep it part of my practice.


Differences between Org Mode and Mediawiki lightweight markup syntax

A screenshor of GNU Emacs with two buffers open. One buffer is in Org Mode and another is in Mediawiki mode.
Org Mode and Mediawiki headers, italics and bold text

The table below and the image to the right illustrate some differences between Org Mode syntax and Mediawiki syntax. There are some points of non-comparison in the markup languages. For example, Mediawiki's syntax provides shorthand ways of linking to User pages and inputting category tags. These features are specific to Mediawikis and are not part of collections of Org files.

Some Differences between Lightweight Markup Syntax
Feature Org Mode Mediawiki
Italics /Example/ ''Example''
Bold *Example* '''Example'''
Bold and Italics ??? '''''Example'''''
Header 1 * Example = Example =
Header 2 ** Example == Example ==
Header 3 *** Example === Example ===
Internal Link [[Example.foo][Alt Text] [[Example|Alt Text]
External Link [[https://example.com][Alt Text]] [https://example.com Alt Text]
Category Tag n/a [[Category:Example]]
Category Link n/a [[:Category:Example]]
User Page Link n/a [[User:Foo]]
Horizontal line n/a? ----
Bulleted list - Foo
- Bar
- Baz
* Foo
* Baz
* Bar

Raising the question...

Why not just write texts in Emacs / Org Mode and then export it to a mediawiki file. Then take the copy in the mediawiki file and upload it to the Wiki.

  1. That would probably save time and
  2. It would also make the process of writing more comfortable.
    Why? Because of the connection between text editors and keyboard shortcuts.

So what's the problem?

When I attempt to connect to the XPUB and Lens-based wiki from within Emacs I receive the following error message:

Bad url: pzwiki.wdka.nl/mw-mediadesign/api.php

I don't understand why this is the case.