* Formatting C (or other code) to HTML for blog posts
@ 2008-10-30 15:45 Alex Bennee
2008-10-30 16:32 ` Lennart Borgman
0 siblings, 1 reply; 8+ messages in thread
From: Alex Bennee @ 2008-10-30 15:45 UTC (permalink / raw)
To: help-gnu-emacs
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 <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).
--
Alex Bennee, Software Engineer
Tcl tends to get ported to weird places like routers. -- Larry Wall in
<199710071721.KAA19014@wall.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Formatting C (or other code) to HTML for blog posts
[not found] <mailman.2498.1225381561.25473.help-gnu-emacs@gnu.org>
@ 2008-10-30 15:52 ` Charles Sebold
2008-10-30 16:41 ` Xah
1 sibling, 0 replies; 8+ messages in thread
From: Charles Sebold @ 2008-10-30 15:52 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Formatting C (or other code) to HTML for blog posts
2008-10-30 15:45 Alex Bennee
@ 2008-10-30 16:32 ` Lennart Borgman
0 siblings, 0 replies; 8+ messages in thread
From: Lennart Borgman @ 2008-10-30 16:32 UTC (permalink / raw)
To: Alex Bennee; +Cc: help-gnu-emacs
On Thu, Oct 30, 2008 at 4:45 PM, Alex Bennee <ajb-ml@cbnl.com> 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 <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).
See http://www.emacswiki.org/emacs-en/PrintWithWebBrowser
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Formatting C (or other code) to HTML for blog posts
[not found] <mailman.2498.1225381561.25473.help-gnu-emacs@gnu.org>
2008-10-30 15:52 ` Formatting C (or other code) to HTML for blog posts Charles Sebold
@ 2008-10-30 16:41 ` Xah
2008-10-30 21:37 ` Lennart Borgman
` (2 more replies)
1 sibling, 3 replies; 8+ messages in thread
From: Xah @ 2008-10-30 16:41 UTC (permalink / raw)
To: help-gnu-emacs
On Oct 30, 8:45 am, Alex Bennee <ajb...@cbnl.com> 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 <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).
not sure about blogs because their support for raw html differs.
anyhow, i use htmlize and am very happy about it. For detail, see:
http://xahlee.org/emacs/elisp_htmlize.html
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Formatting C (or other code) to HTML for blog posts
2008-10-30 16:41 ` 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>
2 siblings, 0 replies; 8+ messages in thread
From: Lennart Borgman @ 2008-10-30 21:37 UTC (permalink / raw)
To: Xah; +Cc: help-gnu-emacs
On Thu, Oct 30, 2008 at 5:41 PM, Xah <xahlee@gmail.com> wrote:
> anyhow, i use htmlize and am very happy about it. For detail, see:
>
> http://xahlee.org/emacs/elisp_htmlize.html
If htmlize.el have not change lately it might be worth that
htmlfontify.el can do a little bit more. I recognizes some more way to
do the fontification. But htmlize.el is also very good.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Formatting C (or other code) to HTML for blog posts
2008-10-30 16:41 ` 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>
2 siblings, 0 replies; 8+ messages in thread
From: Xavier Maillard @ 2008-10-30 23:25 UTC (permalink / raw)
To: Xah; +Cc: help-gnu-emacs
Hi
Although you often have strong opinions on anything on this list
(often I disagree with), I really like to read your website (and
articles). Why don't you put them onto emacswiki to "increase"
the quality of the website content ?
This article for example would be a perfect candidate for an
emacswiki page:
http://xahlee.org/emacs/elisp_htmlize.html
Regards,
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Formatting C (or other code) to HTML for blog posts
[not found] ` <mailman.2523.1225402669.25473.help-gnu-emacs@gnu.org>
@ 2008-10-31 23:12 ` Xah
2008-11-01 0:18 ` Lennart Borgman
0 siblings, 1 reply; 8+ messages in thread
From: Xah @ 2008-10-31 23:12 UTC (permalink / raw)
To: help-gnu-emacs
On Oct 30, 2:37 pm, "Lennart Borgman" <lennart.borg...@gmail.com>
wrote:
> On Thu, Oct 30, 2008 at 5:41 PM, Xah <xah...@gmail.com> wrote:
> > anyhow, i use htmlize and am very happy about it. For detail, see:
>
> >http://xahlee.org/emacs/elisp_htmlize.html
>
> If htmlize.el have not change lately it might be worth that
> htmlfontify.el can do a little bit more. I recognizes some more way to
> do the fontification. But htmlize.el is also very good.
am very happy with “htmlize.el”. When i was looking for a solution in
2006 or so, i did spent some min with “htmlfontify.el” but i recall i
was confused. It's author was active in freenode.net's #emacs irc
channel, maybe still is ...
the author of htmlize.el will not have his package be part of GNU
emacs. Maybe if htmlfontify.el becomes part of emacs i'll give it a
swirl.
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Formatting C (or other code) to HTML for blog posts
2008-10-31 23:12 ` Xah
@ 2008-11-01 0:18 ` Lennart Borgman
0 siblings, 0 replies; 8+ messages in thread
From: Lennart Borgman @ 2008-11-01 0:18 UTC (permalink / raw)
To: Xah; +Cc: help-gnu-emacs
On Sat, Nov 1, 2008 at 12:12 AM, Xah <xahlee@gmail.com> wrote:
> On Oct 30, 2:37 pm, "Lennart Borgman" <lennart.borg...@gmail.com>
> wrote:
>> On Thu, Oct 30, 2008 at 5:41 PM, Xah <xah...@gmail.com> wrote:
>> > anyhow, i use htmlize and am very happy about it. For detail, see:
>>
>> >http://xahlee.org/emacs/elisp_htmlize.html
>>
>> If htmlize.el have not change lately it might be worth that
>> htmlfontify.el can do a little bit more. I recognizes some more way to
>> do the fontification. But htmlize.el is also very good.
>
> am very happy with "htmlize.el". When i was looking for a solution in
> 2006 or so, i did spent some min with "htmlfontify.el" but i recall i
> was confused. It's author was active in freenode.net's #emacs irc
> channel, maybe still is ...
>
> the author of htmlize.el will not have his package be part of GNU
> emacs. Maybe if htmlfontify.el becomes part of emacs i'll give it a
> swirl.
I believe htmlfontify.el is on its way to become a part of GNU Emacs.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-11-01 0:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.2498.1225381561.25473.help-gnu-emacs@gnu.org>
2008-10-30 15:52 ` Formatting C (or other code) to HTML for blog posts Charles Sebold
2008-10-30 16:41 ` 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
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.