From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Raghavendra Nyshadham Newsgroups: gmane.emacs.help Subject: Re: Editing MediaWiki pages Date: Tue, 31 Oct 2017 19:47:26 +0530 Message-ID: <95EF060F-CEB3-48CB-885B-B60458AF9B1E@gmail.com> References: <878tfyzmeq.fsf@gmail.com> <87vaixx9yf.fsf@skimble.plus.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1509459513 8675 195.159.176.226 (31 Oct 2017 14:18:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 31 Oct 2017 14:18:33 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Sharon Kimble Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 31 15:18:19 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 1e9XMq-0000RK-FZ for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Oct 2017 15:18:12 +0100 Original-Received: from localhost ([::1]:45848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9XMx-0007yK-QZ for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Oct 2017 10:18:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9XME-0007y3-UM for help-gnu-emacs@gnu.org; Tue, 31 Oct 2017 10:17:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9XMB-0005qP-HN for help-gnu-emacs@gnu.org; Tue, 31 Oct 2017 10:17:34 -0400 Original-Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:55149) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9XMB-0005q0-7h for help-gnu-emacs@gnu.org; Tue, 31 Oct 2017 10:17:31 -0400 Original-Received: by mail-pf0-x244.google.com with SMTP id n89so13873896pfk.11 for ; Tue, 31 Oct 2017 07:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0SdDN4DGTWErRZY8beDSUz9Tu9Cf3FPvCURCrS/NumE=; b=cNKTJRGiWyYaugZuIZVhon5S+/I9FMUZ2Nnke1morU2fPN+stZMvnt/IAnLu0oxpO9 MQXBsRWAQlfg+nLuFlt7Fx3e4Diz4PTu0nEq2q9Yv4ZaTJODtjnG+ST50rOdOXQML/nU /iLC/RXPRCE/vlwNfUe93AIhZS0pyQixB5LnPkrtzQ8oGEnsn+Pky27ZBRm2ogeBwvfp otm9iyw/aX7Czfe1qSrEnVvTXj0MT1hptU8NovfYON7NenEposgtubbdWSODvb4ucGXB pmEuK69S4Bz+3EzabwK9e5k/ya6OUKdV0Y2u6B51Roi2THXynT9pe/Uz3+GW8j2EzuEg yE/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0SdDN4DGTWErRZY8beDSUz9Tu9Cf3FPvCURCrS/NumE=; b=jBcwrEjx8bsYVbEHo+a/FLkcG5E1WtHAI23GuG0zDBnGSLsN5jFLA+4WLN+2Wx3pZt iISIjS/jHyQRYq/eX87dy+ijwx0g3QOr1JF6Xa4kr/TN9u3IF4/j2/cVgqavCcjOHSKX 4mriq68djM7aXJhLCvSphL9/SqgL5pRrrdE80Pp/w2pwh6ohBCK7i22Wom+rY9HyPmkR /v12mbCrel2n61gbLED72Kq1pUxHsxumxAmM0YH3LddkMSCEbXYXCa6ak8UkE5nDhKtW m0QP7Oz88SBptKhzGLlHiM+xTo7EiF6KLPRH7nSA5zqJ7evlRHrtZqH/VAqBYZkcbCvW nn5A== X-Gm-Message-State: AMCzsaVAFfauNbnMSI0PoC9SkFqz0cSAOpXD1IMUPl93iWnr2/G8T7Ic f/nfbu/fgUJHm1nytrQEPc7xhbjY X-Google-Smtp-Source: ABhQp+TXfuE8WQfqTftrdTL964mw4GSIjbrhGROV3rmEV1eWflnjZXuOKLGlYXxBLiqqvmHnxprN6w== X-Received: by 10.99.116.18 with SMTP id p18mr1908176pgc.269.1509459449798; Tue, 31 Oct 2017 07:17:29 -0700 (PDT) Original-Received: from [192.169.72.93] ([113.193.186.178]) by smtp.gmail.com with ESMTPSA id k20sm4276663pfg.141.2017.10.31.07.17.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Oct 2017 07:17:29 -0700 (PDT) X-Mailer: iPad Mail (15A421) In-Reply-To: <87vaixx9yf.fsf@skimble.plus.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:114707 Archived-At: Dear Sharon, Thanks for the message. I am sorry for the delay in replying; I am traveling= . The Wiki I am writing in is a multiuser one, where users edit pages with to= ols of their choice. Therefore, maintaining local versions of the pages in O= rg mode, and exporting from them, is not feasible.=20 Regards, Raghu. --=20 N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/ > On 30-Oct-2017, at 14:56, Sharon Kimble wrote= : >=20 > "N. Raghavendra" writes: >=20 >> 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: >>=20 >> 1. wikipedia-mode, >> https://en.wikipedia.org/wiki/Wikipedia:Wikipedia-mode.el >>=20 >> 2. mediawiki-el, https://github.com/hexmode/mediawiki-el >>=20 >> I would appreciate any advice or recommendations about these or other >> packages for editing MediaWiki pages with Emacs. >=20 > Hi Raghu, sorry for not replying sooner but I've had the builders in and > am only now getting sorted out. >=20 > 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. >=20 > --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 b= uffer) > #+END_SRC > [2017-03-16 Thu 10:30] >=20 > #+BEGIN_SRC emacs-lisp > (defun mediawiki-test-suite () > (toggle-truncate-lines 0) > (abbrev-mode 1) > (set-fill-column 65000) > (auto-fill-mode 0)) >=20 > (add-hook 'mediawiki-mode-hook #'mediawiki-test-suite) > #+END_SRC > [2017-03-17 Fri 21:04] >=20 > #+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--- >=20 > I've also set up several yasnippets which I find very useful when I'm > writing org-mode2mediawiki test, and they are - >=20 > --8<---------------cut here---------------start------------->8--- > # -*- mode: snippet -*- > # name: category > # key: medcas > # -- > [[Category: >=20 > # -*- mode: snippet -*- > # name: citation > # key: cref > # -- > >=20 > # -*- mode: snippet -*- > # name: citation repeat > # binding: M-s-8 > # -- > >=20 > # -*- mode: snippet -*- > # name: mediawiki-end > # key: medend > # -- > ---- >=20 > =3D=3D References =3D=3D >=20 > >=20 > >
> [[#top| '''Back to the Top''' ]] >
> >
> [[#top| '''Back to the Top''' ]] >
> --8<---------------cut here---------------end--------------->8--- >=20 > I hope that these have been helpful, and if I can help you further, > please, get in contact. >=20 > Thanks > Sharon. > --=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 > Debian 9.2, fluxbox 1.3.5-2, emacs 25.3.2, org-mode 9.1.1