all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Charles Sebold <csebold@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Formatting C (or other code) to HTML for blog posts
Date: Thu, 30 Oct 2008 10:52:34 -0500	[thread overview]
Message-ID: <uskqecc71.fsf@gmail.com> (raw)
In-Reply-To: mailman.2498.1225381561.25473.help-gnu-emacs@gnu.org

On 30 Oct 2008, Alex Bennee wrote:

> 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 <pre> 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 <br>'s
> appear).

htmlize.el works, but it might be overkill for what you want.  I have
used that to get code onto blog posts in Wordpress but I still end up
massaging it a fair bit.

http://www.emacswiki.org/emacs/Htmlize

Check out the other possibilities on that page as well.
-- 
Charles Sebold                                     30th of October, 2008


       reply	other threads:[~2008-10-30 15:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2498.1225381561.25473.help-gnu-emacs@gnu.org>
2008-10-30 15:52 ` Charles Sebold [this message]
2008-10-30 16:41 ` Formatting C (or other code) to HTML for blog posts Xah
2008-10-30 21:37   ` Lennart Borgman
2008-10-30 23:25   ` Xavier Maillard
     [not found]   ` <mailman.2523.1225402669.25473.help-gnu-emacs@gnu.org>
2008-10-31 23:12     ` Xah
2008-11-01  0:18       ` Lennart Borgman
2008-10-30 15:45 Alex Bennee
2008-10-30 16:32 ` Lennart Borgman

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=uskqecc71.fsf@gmail.com \
    --to=csebold@gmail.com \
    --cc=help-gnu-emacs@gnu.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.