From: "Fabrice Niessen" <tdhkhcidiacy-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org
Subject: Re: code markup in muse-mode
Date: Wed, 08 Apr 2009 17:08:46 +0200 [thread overview]
Message-ID: <87ljqbw5c1.fsf@mundaneum.com> (raw)
In-Reply-To: mailman.4899.1239202228.31690.help-gnu-emacs@gnu.org
Matt,
Matt Price wrote:
> Fabrice Niessen wrote:
>>> i'm using muse mode via blog.el to publish to my wordpress blog. i'd like
>>> to have sections in 'code markup'.
>>
>> Have a look at my site (currently completely done in Muse) to see if it
>> fulfills your needs.
>>
>> In particular, check out http://www.mygooglest.com/fni/site-map.html#sec2.
>
> fabrice, that looks great! and it's more than I was hoping for. next
> question: when you're writing an entry, what command do you use to tell
> htmlize what language you're writing in? so for instance, if I've pasted a
> snippet of xorg.conf into my muse buffer, how does htmlize know that this
> little snippet is in conf-mode? Or if I have 3 or 4 lines of bash commands,
> what do I tell htmlize to do?
Somes real-life examples:
--8<---------------cut here---------------start------------->8---
<src lang="sh">
sudo aptitude install firestarter
</src>
<include file="~/.emacs" markup="src" lang="emacs-lisp">
<src lang="shell-script">
whereis port
cd /usr/ports/<some-path>/port
make
cd work/port
make [-n] install [PREFIX=/usr/local/stow/port]
</src>
<src lang="emacs-lisp">
;; override output type `inline-css' used for htmlizing a region
(defun htmlize-region-for-paste (beg end)
"Htmlize the region and return just the HTML as a string.
This forces the `css' style and only returns the HTML body, but
without the BODY tag. This should make it useful for inserting
the text to another HTML buffer."
(let* ((htmlize-output-type 'css) ; was `inline-css'
(htmlbuf (htmlize-region beg end)))
(unwind-protect
(with-current-buffer htmlbuf
(buffer-substring (plist-get htmlize-buffer-places 'content-start)
(plist-get htmlize-buffer-places 'content-end)))
(kill-buffer htmlbuf))))
</src>
--8<---------------cut here---------------end--------------->8---
See for more info in the manual.
Fabrice
_________________________________________________________________________
Fabrice Niessen
Search the Web with "My Google Search Tools" on http://www.MyGooglest.com
next prev parent reply other threads:[~2009-04-08 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.4791.1239116616.31690.help-gnu-emacs@gnu.org>
2009-04-08 10:11 ` code markup in muse-mode Fabrice Niessen
2009-04-08 14:50 ` Matt Price
[not found] ` <mailman.4899.1239202228.31690.help-gnu-emacs@gnu.org>
2009-04-08 15:08 ` Fabrice Niessen [this message]
2009-04-07 15:03 Matt Price
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ljqbw5c1.fsf@mundaneum.com \
--to=tdhkhcidiacy-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=help-gnu-emacs-mXXj517/zsQ@public.gmane.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.