unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Raghavendra Nyshadham <nyraghu27132@gmail.com>
To: Sharon Kimble <boudiccas@skimble.plus.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Editing MediaWiki pages
Date: Tue, 31 Oct 2017 19:47:26 +0530	[thread overview]
Message-ID: <95EF060F-CEB3-48CB-885B-B60458AF9B1E@gmail.com> (raw)
In-Reply-To: <87vaixx9yf.fsf@skimble.plus.com>

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 tools of their choice.  Therefore, maintaining local versions of the pages in Org mode, and exporting from them, is not feasible. 

Regards,
Raghu.

-- 
N. Raghavendra <raghu@hri.res.in>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/

> On 30-Oct-2017, at 14:56, Sharon Kimble <boudiccas@skimble.plus.com> wrote:
> 
> "N. Raghavendra" <nyraghu27132@gmail.com> 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
> # --
> <ref name="$0"> </ref>
> 
> # -*- mode: snippet -*-
> # name: citation repeat
> # binding: M-s-8
> # --
> <ref name="$0"/>
> 
> # -*- mode: snippet -*-
> # name: mediawiki-end
> # key: medend
> # --
> ----
> 
> == References ==
> 
> <references />
> 
> <span id="BackToTop"></span>
> <div class="noprint" style="background-color:#fc3; color:#d33; position:fixed; bottom:2%; left:0.25%; padding:0; margin:0;">
> [[#top| '''Back to the Top''' ]]
> </div>
> <span id="BackToTop"></span>
> <div class="noprint" style="background-color:#fc3; color:#d33; position:fixed; bottom:2%; right:0.25%; padding:0; margin:0;">
> [[#top| '''Back to the Top''' ]]
> </div>
> --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


  reply	other threads:[~2017-10-31 14:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26  2:13 Editing MediaWiki pages N. Raghavendra
2017-10-30  9:26 ` Sharon Kimble
2017-10-31 14:17   ` Raghavendra Nyshadham [this message]
2017-11-14 19:08   ` Narendra Joshi
2017-11-15 15:58     ` Sharon Kimble
2017-11-15 16:09       ` Emanuel Berg
2017-11-15 16:47         ` tomas
2017-11-15 17:40           ` Emanuel Berg
2017-11-15 18:33           ` N. Raghavendra
2017-11-15 16:33     ` N. Raghavendra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95EF060F-CEB3-48CB-885B-B60458AF9B1E@gmail.com \
    --to=nyraghu27132@gmail.com \
    --cc=boudiccas@skimble.plus.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).