From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Linking Emacs with libxml2 Date: Mon, 6 Sep 2010 23:18:25 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1283807941 9557 80.91.229.12 (6 Sep 2010 21:19:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Sep 2010 21:19:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 06 23:18:59 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Osj5e-0007TL-Tu for ged-emacs-devel@m.gmane.org; Mon, 06 Sep 2010 23:18:59 +0200 Original-Received: from localhost ([127.0.0.1]:51949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Osj5e-0000xb-8n for ged-emacs-devel@m.gmane.org; Mon, 06 Sep 2010 17:18:58 -0400 Original-Received: from [140.186.70.92] (port=40778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Osj5T-0000w7-1k for emacs-devel@gnu.org; Mon, 06 Sep 2010 17:18:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Osj5R-0006CE-VG for emacs-devel@gnu.org; Mon, 06 Sep 2010 17:18:46 -0400 Original-Received: from mail-qw0-f41.google.com ([209.85.216.41]:49866) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Osj5R-0006CA-RH for emacs-devel@gnu.org; Mon, 06 Sep 2010 17:18:45 -0400 Original-Received: by qwf7 with SMTP id 7so5536404qwf.0 for ; Mon, 06 Sep 2010 14:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=l1VnWdYGyplvMHeYo0dLSSJL2VvT/RMWm331XNNxUwg=; b=DrPVEusg5ty8zCxrHFd0ua6CU9L3T/ZCVG0MDBxYgkD1JUxf2qPVx9iSJGpnFF16Ma XIkktU/CdW7qND77zssaSGPTXytySv/9lGqePlhYOGDyLskFBVds4s4f8BzYzVZajdGZ YhwKveLcl2w/6P4vMy85O4n0EGDykC+/i5yBE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=GIvOJty9wuTjNYnymptjcEY+33Ft1CgHVdI2rllHc54c7usYgcANsDKVr9euDZrHXe sqzCJnarydS8FtzrF/txSfF3BZhACXSRfUD2IkJWB9Dn0PHyvqA8KhkdwZNxiHe6Wuvv 5UiJMMAiXVPVKatcvD8Fpv1e3Lji8BkJH7aKY= Original-Received: by 10.229.245.75 with SMTP id lt11mr3931299qcb.139.1283807925256; Mon, 06 Sep 2010 14:18:45 -0700 (PDT) Original-Received: by 10.229.216.74 with HTTP; Mon, 6 Sep 2010 14:18:25 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129727 Archived-At: On Mon, Sep 6, 2010 at 11:08 PM, Stefan Monnier wrote: >> Apparently libxml2 comes with a parser for "real world" HTML, which is >> very intriguing: > [...] >> Has this been discussed before and rejected? =C2=A0It seems like an obvi= ous >> idea, and would enable both easier extraction of data from HTML files, >> as well as writing a (simple) HTML renderer in Emacs Lisp. > > It's an obvious idea, but I think it's a fair bit of work: > - you'll probably want your function to be able to read from a buffer > =C2=A0rather than from a file (reading from a file would slow down the > =C2=A0operation to a point where using a separate xml-to-elisp executable > =C2=A0isn't that much worse). > - parsing HTML is the easy part, rendering it in Emacs is a lot > =C2=A0more difficult. But perhaps can libxml2 be used by semantic? Though I do not know if that is interesting.