"N. Raghavendra" writes: > I have recently started contributing to a Wiki that runs on MediaWiki. > I have been writing on the Web interface of the Wiki, which is > convenient for previewing, but is otherwise inconvenient. I would like > to edit the Wiki pages from Emacs. I found two packages for this: > > 1. wikipedia-mode, > https://en.wikipedia.org/wiki/Wikipedia:Wikipedia-mode.el > > 2. mediawiki-el, https://github.com/hexmode/mediawiki-el > > I would appreciate any advice or recommendations about these or other > packages for editing MediaWiki pages with Emacs. Hi Raghu, sorry for not replying sooner but I've had the builders in and am only now getting sorted out. I regularly write 'articles' for my 'DrugFacts' mediawiki, using org-mode exported as mediawiki. Every article and menu on that site is written in org-mode, except for the top drop-down menu, and the articles are also stored in mediawiki format in my ~/.emacs.d/wiki' directory. Because my main file for DrugFacts is 3.4mb, I highlight the section that I want to export and then export it as mediawiki, so that in the mediawiki buffer I'm only left with the correct section and nothing else. But it does require rereading and then various things like citations being sorted out, for which I use several yasnippets further down this email. --8<---------------cut here---------------start------------->8--- #+BEGIN_SRC emacs-lisp (require 'mediawiki) ;;(require 'ox-mediawiki) (eval-after-load "org" '(require 'ox-mediawiki nil t)) (global-set-key (kbd "M-s-a") 'org-mw-export-to-mediawiki) ;; ("mw" file) (global-set-key (kbd "M-s-e") 'org-mw-export-as-mediawiki) ;; (temporary buffer) #+END_SRC [2017-03-16 Thu 10:30] #+BEGIN_SRC emacs-lisp (defun mediawiki-test-suite () (toggle-truncate-lines 0) (abbrev-mode 1) (set-fill-column 65000) (auto-fill-mode 0)) (add-hook 'mediawiki-mode-hook #'mediawiki-test-suite) #+END_SRC [2017-03-17 Fri 21:04] #+BEGIN_SRC emacs-lisp ;; do this in a hook because mediawiki-mode resets its keybindings on ;; evey mode change. (add-hook 'mediawiki-mode-hook (lambda () (define-key mediawiki-mode-map (kbd "C-x C-s") 'save-buffer))) #+END_SRC [2017-04-12 Wed 15:19] --8<---------------cut here---------------end--------------->8--- I've also set up several yasnippets which I find very useful when I'm writing org-mode2mediawiki test, and they are - --8<---------------cut here---------------start------------->8--- # -*- mode: snippet -*- # name: category # key: medcas # -- [[Category: # -*- mode: snippet -*- # name: citation # key: cref # -- # -*- mode: snippet -*- # name: citation repeat # binding: M-s-8 # -- # -*- mode: snippet -*- # name: mediawiki-end # key: medend # -- ---- == References ==
[[#top| '''Back to the Top''' ]]
[[#top| '''Back to the Top''' ]]
--8<---------------cut here---------------end--------------->8--- I hope that these have been helpful, and if I can help you further, please, get in contact. Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk TGmeds = http://www.tgmeds.org.uk DrugFacts = https://www.drugfacts.org.uk Debian 9.2, fluxbox 1.3.5-2, emacs 25.3.2, org-mode 9.1.1