From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.help Subject: Re: Formatting C (or other code) to HTML for blog posts Date: Thu, 30 Oct 2008 17:32:27 +0100 Message-ID: References: <1225381544.13198.16.camel@pitcairn.cambridgebroadband.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225384381 6131 80.91.229.12 (30 Oct 2008 16:33:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Oct 2008 16:33:01 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Alex Bennee" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 30 17:34:03 2008 connect(): Connection refused 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 1KvaTB-0003Jf-Hi for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Oct 2008 17:34:01 +0100 Original-Received: from localhost ([127.0.0.1]:33822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvaS5-0004IU-4m for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Oct 2008 12:32:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvaRk-0004FB-D3 for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 12:32:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvaRi-0004CJ-Sr for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 12:32:32 -0400 Original-Received: from [199.232.76.173] (port=59825 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvaRi-0004C8-MZ for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 12:32:30 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.172]:29326) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvaRi-0001t1-S2 for help-gnu-emacs@gnu.org; Thu, 30 Oct 2008 12:32:31 -0400 Original-Received: by ug-out-1314.google.com with SMTP id 36so1119359uga.17 for ; Thu, 30 Oct 2008 09:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ESyWGsX3FLKKwMxvrfAu10ZbeiT1QQVQ00/jXJQZlN4=; b=gtNxUOQKVaLr1GoRl9EbdtVw+qDTXXXwkuJKM49zD3kY5jzM+bKmohhhYTrH9x6LLR rI/dabSvbEo0Us1i8v2N2oTP+zsxmZd9GHLeqTgARexdfHom3Uk1cbmZNz2rRCgozl0S yL29FF5NT6iORiXyLx+MPtYps8Eebw/Qd9+Sw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=DZoc7YLxc2Bc+7g4A4FUFvlACnLw5uiMePk/3JqVOD1Xjp7zbFU0obBTP35Ysj8HGX nqlc7LAJ1RdhzRk1C534m4np4jERc4z+DDZETmiFq+An1ndlgsLGv4dPrf0TG82UFmq6 NU5k6fZIuMQiNI//Dybr/80LktkLuXRMnVOkc= Original-Received: by 10.86.84.5 with SMTP id h5mr7385894fgb.59.1225384347849; Thu, 30 Oct 2008 09:32:27 -0700 (PDT) Original-Received: by 10.86.65.3 with HTTP; Thu, 30 Oct 2008 09:32:27 -0700 (PDT) In-Reply-To: <1225381544.13198.16.camel@pitcairn.cambridgebroadband.com> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.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@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59261 Archived-At: On Thu, Oct 30, 2008 at 4:45 PM, Alex Bennee wrote: > Hi, > > Is there a function that will format some source code into HTML so I > don't loose formatting from the spaces and tabs being eaten up. Usually > I would wrap the code in
 but for various reasons this is not so
> easy to do (the blog software chews double spaces).
>
> It would be extra nice if the function did pretty syntax highlighting!
>
> I tried format-encode-region to html but that didn't seem to so what I
> wanted (or at least I didn't see a bunch of &nsp;'s and 
's appear). See http://www.emacswiki.org/emacs-en/PrintWithWebBrowser