From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: Rendering HTML Date: Sun, 19 Sep 2010 14:14:29 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1284898491 32119 80.91.229.12 (19 Sep 2010 12:14:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 19 Sep 2010 12:14:51 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 19 14:14:50 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 1OxInB-00068y-1L for ged-emacs-devel@m.gmane.org; Sun, 19 Sep 2010 14:14:49 +0200 Original-Received: from localhost ([127.0.0.1]:33427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxInA-0004L2-0l for ged-emacs-devel@m.gmane.org; Sun, 19 Sep 2010 08:14:48 -0400 Original-Received: from [140.186.70.92] (port=36281 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxIn0-0004J3-6A for emacs-devel@gnu.org; Sun, 19 Sep 2010 08:14:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxImw-0006ur-2K for emacs-devel@gnu.org; Sun, 19 Sep 2010 08:14:38 -0400 Original-Received: from smtprelay-b12.telenor.se ([62.127.194.21]:52289) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxImv-0006uZ-Jr for emacs-devel@gnu.org; Sun, 19 Sep 2010 08:14:34 -0400 Original-Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id CEE8EE9300 for ; Sun, 19 Sep 2010 14:14:31 +0200 (CEST) X-SENDER-IP: [83.227.138.150] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnU1ACqblUxT44qWPGdsb2JhbACHboxbjXIMAQEBAR4XCyK9a4VBBIo4gxQ X-IronPort-AV: E=Sophos;i="4.56,389,1280700000"; d="scan'208,217";a="1672820033" Original-Received: from ua-83-227-138-150.cust.bredbandsbolaget.se (HELO www.verona.se) ([83.227.138.150]) by ipb4.telenor.se with ESMTP; 19 Sep 2010 14:14:31 +0200 Original-Received: from localhost.localdomain (unknown [192.168.201.6]) by www.verona.se (Postfix) with ESMTP id 440D2733260 for ; Sun, 19 Sep 2010 14:14:30 +0200 (CEST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sat, 18 Sep 2010 22:06:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:130476 Archived-At: Lars Magne Ingebrigtsen writes: > The next think I thought I'd tackle (after a couple more weeks of > polishing up the recent changes to Gnus) is writing a very simple HTML > renderer for Emacs. > > I'm not very ambitious here at all -- just something that will make > simple, non-CSS-ey HTML (like what you find in emails and RSS entries) > look OK. > > Since we have the HTML parser in Emacs, most of the HTML rendering is > trivial (I mean, doing stuff like , ,
, etc). The one > challenging (well, challenging to me) thing is actually how to do > tables. > > You have stuff like > > > >
> > >
> ... > > So you have all these boxes inside of boxes, with some constraints that > are absolute, and others that are relative (% and getting the width of a > box depending on what it contains and how you break the text in the > box), and so on. > > So before I give my brain a strain trying to think about this, has > anybody else done something like this? Either code that can be included > in Emacs, or other Lisp code that I can peek at, or, failing all that, > just somebody who has written something about how to approach this? FWIW I have given it some slight thought. Having some form of table rendering in Emacs would make it possible to have greater readability for a great deal of web-pages in Emacs, so its worthwile IMHO. The thing I thought of, was to re-use the window rendering code, so as to allow rendering of sub-windows inside Emacs windows. There has been lots of threads about this and two different sets of patches. I wrote one proposal called "window-groups". I think Martin Rudalics has a newer and better proposal. The idea for tables, then, would be to have each cell render as this new form of sub-window, inside an Emacs window. -- Joakim Verona