[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linking Emacs with libxml2
From: |
joakim |
Subject: |
Re: Linking Emacs with libxml2 |
Date: |
Mon, 06 Sep 2010 21:17:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Chad Brown <address@hidden> writes:
> On Sep 6, 2010, at 11:44 AM, Lennart Borgman wrote:
>
>> On Mon, Sep 6, 2010 at 5:21 PM, Lars Magne Ingebrigtsen <address@hidden>
>> wrote:
>>> Apparently libxml2 comes with a parser for "real world" HTML, which is
>>> very intriguing:
>>>
>>> http://www.xmlsoft.org/html/libxml-HTMLparser.html>>
>>> If Emacs provided a native interface to this function, we could say
>>>
>>> (parse-html "file.html")
>>> => (:html (:head ...) (:body ...))
>>>
>>> and get a nice parse tree out very fast. (Parsing HTML from Emacs Lisp
>>> is rather slow.)
>>>
>>> Has this been discussed before and rejected? It seems like an obvious
>>> idea, and would enable both easier extraction of data from HTML files,
>>> as well as writing a (simple) HTML renderer in Emacs Lisp.
>>
>> It was discussed before here:
>>
>> http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg01147.html>
>> Wasn't there a problem with linking to external libraries at that time?
>
> Yes, there was. The FSF [lawyers] recently determined that it would be
> possible to use external libraries with some explicit marking of legal
> status,
> along the lines of what is used in GCC. Looking back through the mail
> archives, it seems that practical implementation is stuck waiting on an FFI
> design/implementation. I thought that one had been sketched out, but I'm
> not finding it in the archives, so perhaps I am confused.
>
We dont need a generic FFI to link with libxml2, so thats not hindering
adoption. What we would need is an interface specification for xml
parsing in Emacs, and a specific implementation for libxml2.
The problem is rather that adding more dependencies complicates
maintenance of Emacs, and that maintaining a process buffer style
interface is perceived as simpler. Given that sentiment, strong
arguments needs to be presented in favour of in-process handling.
FWIW my personal opinion is that linking with well established external
libraries is no big deal.
> *Chad
--
Joakim Verona
- Linking Emacs with libxml2, Lars Magne Ingebrigtsen, 2010/09/06
- Re: Linking Emacs with libxml2, Wojciech Meyer, 2010/09/06
- Re: Linking Emacs with libxml2, Chad Brown, 2010/09/06
- Re: Linking Emacs with libxml2, Lennart Borgman, 2010/09/06
- Re: Linking Emacs with libxml2, Chad Brown, 2010/09/06
- Re: Linking Emacs with libxml2, Chong Yidong, 2010/09/06
- Re: Linking Emacs with libxml2,
joakim <=
- Re: Linking Emacs with libxml2, Jason Rumney, 2010/09/06
- Re: Linking Emacs with libxml2, Lars Magne Ingebrigtsen, 2010/09/06
- Re: Linking Emacs with libxml2, Lars Magne Ingebrigtsen, 2010/09/08
- Re: Linking Emacs with libxml2, Andreas Schwab, 2010/09/08
- Re: Linking Emacs with libxml2, Stefan Monnier, 2010/09/08
- Re: Linking Emacs with libxml2, Lars Magne Ingebrigtsen, 2010/09/08
- Re: Linking Emacs with libxml2, Lars Magne Ingebrigtsen, 2010/09/08
- Re: Linking Emacs with libxml2, joakim, 2010/09/08
- Re: Linking Emacs with libxml2, Lars Magne Ingebrigtsen, 2010/09/08
- Re: Linking Emacs with libxml2, Andreas Schwab, 2010/09/08