From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Sharon Kimble Newsgroups: gmane.emacs.help Subject: Re: Editing MediaWiki pages Date: Mon, 30 Oct 2017 09:26:48 +0000 Message-ID: <87vaixx9yf.fsf@skimble.plus.com> References: <878tfyzmeq.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1509355666 30893 195.159.176.226 (30 Oct 2017 09:27:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Oct 2017 09:27:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: "N. Raghavendra" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 30 10:27:36 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e96Lx-0006js-R0 for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Oct 2017 10:27:30 +0100 Original-Received: from localhost ([::1]:39355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e96M5-0008Kd-6P for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Oct 2017 05:27:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e96LZ-0008KQ-PW for help-gnu-emacs@gnu.org; Mon, 30 Oct 2017 05:27:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e96LT-0001Gp-PK for help-gnu-emacs@gnu.org; Mon, 30 Oct 2017 05:27:05 -0400 Original-Received: from avasout02.plus.net ([212.159.14.17]:45404 helo=avasout02.plus.net.plus.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e96LT-0001FW-Ib for help-gnu-emacs@gnu.org; Mon, 30 Oct 2017 05:26:59 -0400 Original-Received: from London.london ([51.7.107.43]) by smtp with ESMTPA id 96LOeImYZdhRw96LPeD9XT; Mon, 30 Oct 2017 09:26:55 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.2 cv=Qtou5R6d c=1 sm=1 tr=0 a=fyVFNeTDe8o8k/RiXfvDaQ==:117 a=fyVFNeTDe8o8k/RiXfvDaQ==:17 a=pGLkceISAAAA:8 a=8pif782wAAAA:8 a=NEAV23lmAAAA:8 a=LlzXLoV6AAAA:8 a=iI7HsYTVAAAA:8 a=bAHfVwKlAAAA:8 a=Lk-u03a6KIqV-0u0KKYA:9 a=uaUka9vT9v3gmy45:21 a=o6hvNq8ghLYOWhrX:21 a=X_968jUBM75L7W6o8r4A:9 a=ONNS8QRKHyMA:10 a=diwpeB1DDhFXqWA7J4Up:22 a=KxyM1Xthmv57RbWRIpnN:22 a=fjrkRJ71zQ2jzMzczd-K:22 X-AUTH: skimble@:2500 In-Reply-To: <878tfyzmeq.fsf@gmail.com> (N. Raghavendra's message of "Thu, 26 Oct 2017 07:43:33 +0530") X-CMAE-Envelope: MS4wfKUYt+oJxeaMqQTyjxyY9mmsO5JpIHLIyQfVHGeXBvtC0fYqW5RVgPVF9ro4o5Toyoem3Dv5woKplpaYRW9a3fGeVAC8RAI9/tQzhIF3GOOfUfxu2DaP AJOFv25ij1t8q3KbqBewVQalLTMhG8ReBED2IV6xkbU+GQ0X22ddv+JoUuFSbIssyFcSbnwsZDOqYA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 212.159.14.17 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114699 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable "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. =2D-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 bu= ffer) #+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] =2D-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 - =2D-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 # -- =2D--- =3D=3D References =3D=3D
[[#top| '''Back to the Top''' ]]
[[#top| '''Back to the Top''' ]]
=2D-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. =2D-=20 A taste of linux =3D http://www.sharons.org.uk TGmeds =3D http://www.tgmeds.org.uk DrugFacts =3D https://www.drugfacts.org.uk=20=20 Debian 9.2, fluxbox 1.3.5-2, emacs 25.3.2, org-mode 9.1.1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIyBAEBCgAdFiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAln28FgACgkQNoGAGQr4 g1v3aQ/3Y3BDUXrTvoXePOQIAX5Dt3FBNtfk2cIXObhVotthx24NyLAXjZTrkJVP +3G2UHGX392Ij47TICdZjnOjhCf/GAAKpQUoshLmWfLkeWhJi7Z4QDFAz4q7i4x6 iNMZYqlNUO2GklRPLkdwfFR/UbHOZt8638v+/EYBOgThx2HQ4yhIkmw6Ttbvd4IJ M0VGwPAkWB+rH8VQ/hHOj0Kdj2R6XjtSzVmqxB8DXBFFwxpbuUGqBoCkbDcKhUkD igH6NZwDhmQCQypkBm2kWZQqThcKIAW0LB6GVZ43BMlA/H9qqZIJ8a5hMKL0KTZo i3yCa4v+Yai1FNsrfayhItvNMLyp7Ymk5QRWUMC67pSsWF/Qxa112AVuffu2sozf w03a5LCB7gno3OuI07M3NDVFTk/Tf+QRw5MeKkrS+yB3c6TpecMkn+Fy4BS6ahG+ VE56t8vbMWdgk3DjnkCvz5MamBXid/drvWRyrL82dPUP4+KkTXVzTz6eey035C7z uaGr5gtqS5bE1DcmZzjvf79tP3SZOhqgtF00gqtYdarMw1SBuqFUi2soEX5/+0Vb GNcmG6/luFkZJUDj7udQJQiU8S8YA9QTFZXb3EktlrJXcCK4/JAQ4T1WLbPXPfp2 8Rr7f25JEhoa1vAfi2F/+ehtN1yVoXITFpbIfCNxX3M9Ag37KQ== =XkUm -----END PGP SIGNATURE----- --=-=-=--