From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Fabrice Niessen" Newsgroups: gmane.emacs.help Subject: Re: code markup in muse-mode Date: Wed, 08 Apr 2009 17:08:46 +0200 Organization: My Googlest Message-ID: <87ljqbw5c1.fsf@mundaneum.com> References: <87fxgj5ual.fsf@mundaneum.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1239205260 11504 80.91.229.12 (8 Apr 2009 15:41:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Apr 2009 15:41:00 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Wed Apr 08 17:42:18 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LrZuh-0007OV-OS for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Apr 2009 17:42:08 +0200 Original-Received: from localhost ([127.0.0.1]:58034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrZtJ-0001DU-G8 for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Apr 2009 11:40:41 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!motzarella.org!news.motzarella.org!news.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 60 Original-X-Trace: news.eternal-september.org U2FsdGVkX1/sOmutVNlM5sSdfVtemOIk/51Prd9ZaTMnKEshVTd8oCHxpQkvwb8tA3+1IV10OhHKvXPcdhOeOkMcbtHzFh1cJZdBatO4Lo95yKiNv4573/w460ywXy+Su1CTrLzY1qk= Original-X-Complaints-To: Please send complaints to abuse-xVLBGngCCsvFKiuWU8UaTg@public.gmane.org with full headers Original-NNTP-Posting-Date: Wed, 8 Apr 2009 15:08:46 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19ZCfPYai/LmFG4h6Uwo/lZSTrSmsBTooY= X-Archive: encrypt X-Www-site: http://www.MyGooglest.com Cancel-Lock: sha1:Vm7Fr7/6WXxAMuCEQerNvyz9qUI= sha1:dhpx55m2YD7Ht4CsPdjAN94trDE= User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:168287 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:63570 Archived-At: 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--- sudo aptitude install firestarter whereis port cd /usr/ports//port make cd work/port make [-n] install [PREFIX=/usr/local/stow/port] ;; 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)))) --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