markup.art

May 30th, 2012

I have a rough-draft version of pm-wiki markup working here in WordPress!


[pmwiki]
!! This is a heading
This is some text

!! This is another heading
Wikipedia:PmWiki
[[http://www.google.com|search link]

[/pmwiki]

generates:

This is a heading

This is some text

 

This is another heading

Wikipedia:PmWiki – Intermap example

search link

 

This is accomplished with a WordPress plugin modeled on FsWiki, and a hacked version of PmWiki that doesn’t perform a page-directive (view) by default, allowing the front-end script to pass text to the markup function.

It is far from perfect — the CSS is wonky*, and I’m sure the PmWiki integration is g-dawful; I need to look into page-directives, see if adding a custom directive is the direction I need to go. Plus, the WP plugin ignores the code-directive, so I had to fudge it to get the example above.

But as a proof-of-concept that was started at 11pm, it only took 1.5 hours.

See original notes.

* The CSS is wonky for this entire blog. I’m no CSS-guru, but I seem to understand it a lot better today than when I pieced this thing together. Just look at how the blockquotes are padded weirdly….

UPDATE: A custom action is the direction I need to take.

emacs.art

May 30th, 2012

I’ve been using Emacs as my editor since… I dunno, 5, 6 years now?

Steve Yegge’s js2-mode was an excellent answer for JavaScript coding, but there were a few issues that drove me nuts. Whatever — the benefits outweighed the disadvantages.

Scroll forward to 2012, and I’m refactoring a large codebase, and trying to indent it properly, and Emacs goes nuts. I have to task-kill it several times, until I eventually narrow down the issue to js2-mode trying to indent certain regexes. Aaargh! (And I eventually figured out that I could interrupt the task without killing Emacs, it was just slow to respond….).

Over to google, and I find others with the exact problem, and a solution: Mihai Bazon has a committed patch that isn’t in the release of js2-mode, and some helper functions, as well. Hooray!

  • syndicate

    • Add to MyMSN
    • Add to MyYahoo
    • Add to Google Reader
    • Add to Bloglines
    • Add to Newsgator
    • Add to NewsIsFree