: Open a page. To edit the main page, type "Main Page". Make your edits.

: Open a page. To edit the main page, type "Main Page". Make your edits.

Line 32:

Line 82:

: Submit your modifications.

: Submit your modifications.

−

= Helpful Keybindings =

+

; {{CommandKeys|C-c C-c|mediawiki-save-and-bury}}

+

: Submit modifications and bury the buffer.

−

; {{CommandKeys|C-c|mediawiki-save-and-bury}}

+

== Helpful Keybindings==

−

: Submit modifications and bury the buffer.

; {{CommandKeys|C-return|mediawiki-open-page-at-point}}

; {{CommandKeys|C-return|mediawiki-open-page-at-point}}

Line 42:

Line 92:

; {{CommandKeys|M-g|mediawiki-reload}}

; {{CommandKeys|M-g|mediawiki-reload}}

: Reload a page

: Reload a page

+

+

==Customizations==

+

=== Word Wrap ===

+

+

Mediawiki sites are generally [[Emacs_Terminology#Fill |unfilled]]: do not add hard line breaks within a paragraph. There are various ways to wrap lines [[Emacs_Terminology#Screen Lines |visually]] while you edit. For example in Emacs 24 you may want to enable [[Visual Line]] mode with a [[mode hook]]:

+

+

<syntaxhighlight lang="lisp">

+

(setq mediawiki-mode-hook (lambda ()

+

(visual-line-mode 1)))

+

</syntaxhighlight>

+

+

=== Edit or Create a page in a web browser ===

+

+

Right now '''Mediawiki.el''' fails silently whenever the site asks for number challenge

+

(spam protection). The following snippet allows you to edit/create a

+

page in a web browser

+

+

<syntaxhighlight lang="lisp">

+

(defun yyr-mediawiki-browser-edit/create-page (page &optional site)

+

"Edit a page in browser, asks for page name (sitename also if needed)"

Setup

If you are using emacs-24, you could do the following: Edit your .emacs file like this:

(require 'package)
(package-initialize)
;; Not sure which one should come first, but you certainly one of these.
;; As of sept. 2012, this package is not in ELPA
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)

Then, either use the menu Options->Manage Emacs Packages or type M-X package-list-packages

You can naturally add more MediaWiki sites to the
mediawiki-site-alist variable.

Usage

M-x mediawiki-site

Choose a site (say "WikEmacs") for the current session.

[C-c C-o] (or M-x mediawiki-open)

Open a page. To edit the main page, type "Main Page". Make your edits.

[C-x C-s] (or M-x mediawiki-save)

Submit your modifications.

[C-c C-c] (or M-x mediawiki-save-and-bury)

Submit modifications and bury the buffer.

Helpful Keybindings

[C-return] (or M-x mediawiki-open-page-at-point)

Follow or browse to a WikiLink.

[M-g] (or M-x mediawiki-reload)

Reload a page

Customizations

Word Wrap

Mediawiki sites are generally unfilled: do not add hard line breaks within a paragraph. There are various ways to wrap lines visually while you edit. For example in Emacs 24 you may want to enable Visual Line mode with a mode hook:

(setq mediawiki-mode-hook (lambda ()
(visual-line-mode 1)))

Edit or Create a page in a web browser

Right now Mediawiki.el fails silently whenever the site asks for number challenge
(spam protection). The following snippet allows you to edit/create a
page in a web browser