emacs-devel
[Top][All Lists]
Advanced

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

Re: Rendering HTML


From: joakim
Subject: Re: Rendering HTML
Date: Sun, 19 Sep 2010 14:15:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Lars Magne Ingebrigtsen <address@hidden> 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 <a href>, <img>, <br>, etc).  The one
> challenging (well, challenging to me) thing is actually how to do
> tables.
>
> You have stuff like
>
> <table>
> <tr>
> <td width=30%>
> <table>
> <tr>
> <td width=40px rowspan=2>
> ...
>
> 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



reply via email to

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