mediawiki.el - Emacs mode for editting MediaWiki pages
I seem to be spending an inordinate amount of time editting MediaWiki wikis, so I've had some time to put together a better MediaWiki mode for emacs. In the process, I wrote some code that many people (myself included) seem to think Emacs needs.
HTTP POSTing in native elisp is too hard right now, so a http-post-simple.el was written. The original mediawiki.el required this library, but it wasn't included. I refactored the dependency away and now I have some form parsing functions in elisp that I can contribute back to the Emacs core.
Anyway, if you use Emacs and edit MediaWiki pages, check out mediawiki.el and let me know what you think. I'm especially interested in bug reports from anyone.
HTTP POSTing in native elisp is too hard right now, so a http-post-simple.el was written. The original mediawiki.el required this library, but it wasn't included. I refactored the dependency away and now I have some form parsing functions in elisp that I can contribute back to the Emacs core.
Anyway, if you use Emacs and edit MediaWiki pages, check out mediawiki.el and let me know what you think. I'm especially interested in bug reports from anyone.
GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-09-05 on vernadsky, modified by Ubuntu
I copied mediawiki.el to /home/danlyke/.elisp
Changed my ~/.emacs to have:
(add-to-list 'load-path "/home/danlyke/.elisp/")(require 'mediawiki)
(Takes a while to startup now, I need to figure out how to speed that up) (No, this isn't lisp)
Edited the customize stuff:
MediaWiki Site Default:
Flutterby.netmediawiki-site-alist:
'(("Flutterby.net" "http://www.flutterby.net/wiki/index.ph p" "danlyke" "password"))Note, "password" contains punctuation that might be confusing things, I didn't know how to escape it properly. But no quotes, single or double. Anyway, save that.o
Type in:
m-x mediawiki-edit hp?title=2008-11-24_Kitchen_Drawershttp://www.flutterby.net/wiki/index.p
(for example, I've also tried http://www.flutterby.net/2008-11-24_Kit
Get "if: Wrong type argument: stringp, nil"
Any clues?
And this looks super useful!
I set up an account on your wiki so I could verify this works, but after setting the site parameters, mediawiki-site-alist should contain a fifth empty string -- this is the "first page" that mediawiki.el will automatically dump you into after invoking (TODO: make it more robust when parsing the alist.)
And since you didn't mention it, you do need to invoke mediawiki-site. (TODO: automatically use the default site or, if there is only one site in the alist, use that site. I know, "default" implies this. Oh well.)
After that, the command you should be using is Note that you need to use -open not -edit and you should only type the page name, not the full url. (Underscores are optional, but MediaWiki is case sensitive.)
(custom-set-variables p" "DanLyke" "password"))));; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(mediawiki-site-alist (quote (("Flutterby" "http://www.flutterby.net/wiki/index.ph
'(mediawiki-site-default "Flutterby"))
When I do a
M-x mediawiki-site RET FlutterbyI getmediawiki-site-extract: Symbol's function definition is void: nil-blank-stringWorking off your "fifth empty string" note, I get the same if I do:
'(mediawiki-site-alist (quote (("Flutterby" "http://www.flutterby.net/wiki/index.ph p" "DanLyke" "password" "MainPage"))))or replace "MainPage" with ""
Thanks, and sorry I'm such an Emacs newbie, I hate that I've been using it for ten years and only have a few extra canned lines that I've stolen from various places in my .emacs file.
And is there some other library I may be missing?