emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking Emacs with libxml2


From: Chad Brown
Subject: Re: Linking Emacs with libxml2
Date: Mon, 6 Sep 2010 18:40:47 -0700

I was assuming that people would object to adding a dependency on 
libxml2.  It seems that I was the only one making that assumption, 
especially since it's pulled in for libsrvg already.  My apologies for not 
saying that up-front.

On Sep 6, 2010, at 2:17 PM, Lars Magne Ingebrigtsen wrote:

>> - parsing HTML is the easy part, rendering it in Emacs is a lot
>>  more difficult.
> 
> Well, parsing real work HTML is quite tricky, but you're right in that
> the major part of this work wouldn't be hooking libxml2 into Emacs
> (probably a day's work for somebody who knows what they're doing, and
> three days for me?), but writing an HTML renderer.  I've been looking to
> see whether there are any C libraries for rendering HTML, but I haven't
> found anything.  (Well, except Gecko and Webkit, but 1) we probably
> don't want to make Emacs dependent on those very large libraries, and 2)
> they're oriented towards more graphical environments than Emacs.)
> 
> But I'm kinda unsure how much work writing an HTML renderer would be, if
> you had access to a sensible parse tree.  My guess would be that you
> could have something that rendered 80% of pages very nicely with one
> week's worth of work.  And I take those numbers out of the air, but
> that's the vague feeling I have...

You might want to take a look at w3m (MIT License) or links 2 (GPL) for some
examples of text-based rendering with emacs-like image support.  I don't know 
that either will be preferable to rendering in elisp, but they might at least 
suggest
where to expect difficulty.  I would personally expect the troubles to pop up 
around
tables, CSS, and javascript.

        http://sourceforge.net/projects/w3m/
        http://links.twibright.com/

*Chad





reply via email to

[Prev in Thread] Current Thread [Next in Thread]