All Unkept
Posted in: Blogging and bloggers, Personal and misc, Python  —  18 March 2009

Emacs and personal trac wiki

I've blogged before about using trac as a personal wiki, and that has been working very well for me.

But of course the day would was bound to come when using the text box in a web browser was just too painful. I want to use emacs to edit the text, and do so painlessly.

Of course, I should have realised before that someone else would have already done the hard work:

http://trac-hacks.org/wiki/EmacsWikiEditScript

It has a few dependencies, as you might expect, and I also had to patch xml-rpc.el because I'm using Emacs 23 (the author of trac-wiki.el, Shun-ichi GOTO, helpfully pointed me in the right direction), but it's now working beautifully.

It allows you edit wiki pages directly in Emacs, and much more: it's got syntax highlighting, completion of page names, history and diff modes etc., with key bindings and integration for everything you might want.

A few little Python XML-RPC scripts later, and I can convert this post (written in my wiki, using Emacs, of course) into HTML ready for posting on my blog).

Comments §

§ On 18 March 2009, Brandon Rhodes wrote:
417 Installing the Firefox “It's All Text” plugin, and configuring Emacs as the editor it uses, can also help. Though it sounds like the Trac plugin you've found has many more features (like syntax highlighting), you might want to install “It's All Text” for when you're on sites that you don't personally administer. It's how I do my own blog posts, for example — and it's how I'm typing this very comment! :-)

https://addons.mozilla.org/en-US/firefox/addon/4125

§ On 18 March 2009, luke wrote:
418 Cheers, I'll remember that. I actually use Konqueror usually when browsing, it integrates more nicely into KDE.

The Emacs trac plugin can do lots more things I didn't mention, like being able to jump quickly to other pages in the wiki to edit them etc. Just the fact that you can save regularly and quickly without losing your place is a major win. It's one of those things that I only discovered yesterday but I would now consider it indispensable :-)
 

§ On 28 May 2009, Jason wrote:
435 What was the issue that required the patch? I'm having a problem where all characters that have a corresponding html entity are replaced by their entity. So > becomes >. Is the patch supposed to fix that?

§ On 29 May 2009, luke wrote:
436 @Jason: yeah, it was a double escaping bug as I remember. I can't access that link any more, but from what I've got on my hard drive, the patch is here: http://lukeplant.me.uk/uploads/xml_rpc_double_escaping_fix.diff

Add comment

Format:

  • Javascript has to be on to get past my spam protection, and cookies, and there is a delay, sorry for any inconvenience!
  • I reserve the right to moderate comments.