2 # Ikiwiki plugin for Emacs Muse.
3 # Author: Michael Olson
4 # License: GPLv2 or later
6 # In your ikiwiki.setup file, set the muse_init option to the location
7 # of the init file for Muse. Some examples provided in this directory
8 # are muse-init-simple.el and muse-init-project.el.
10 package IkiWiki
::Plugin
::muse
;
19 hook
(type
=> "htmlize", id
=> "muse", call
=> \
&htmlize
);
24 my $content = decode_utf8
(encode_utf8
($params{content
}));
25 my $qname = $params{page
};
28 my ($fh, $filename) = File
::Temp
::tempfile
();
31 my $qfile = $filename;
34 system qw( emacs -q --no-site-file -batch -l ),
35 $config{muse_init
}, '--eval',
36 qq{(muse
-ikiwiki
-publish
-file
"$qfile" "$qname")};
38 open my $ifh, '<', $filename;
49 print htmlize
(content
=> "<example>\nHello\n</example>\n\nParagraph.\n",
50 page
=> "some_page.muse");