all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: emacs-devel@gnu.org
Subject: Re: Rendering HTML
Date: Sun, 19 Sep 2010 14:15:09 +0200	[thread overview]
Message-ID: <m3aaneq69e.fsf@verona.se> (raw)
In-Reply-To: <m3fwx624w5.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Sat, 18 Sep 2010 22:06:18 +0200")

Lars Magne Ingebrigtsen <larsi@gnus.org> 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



  parent reply	other threads:[~2010-09-19 12:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-18 20:06 Rendering HTML Lars Magne Ingebrigtsen
2010-09-18 20:12 ` Benjamin Hawkes-Lewis
2010-09-22 13:54   ` Mario Lang
2010-09-22 15:56     ` T.V. Raman
2010-09-19 12:14 ` joakim
2010-09-19 12:15 ` joakim [this message]
2010-09-19 13:39   ` Chad Brown
2010-09-19 13:43     ` Lars Magne Ingebrigtsen
2010-09-20 16:14 ` Chong Yidong
2010-09-21 14:37   ` Lars Magne Ingebrigtsen
2010-09-21 22:08     ` Andy Moreton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3aaneq69e.fsf@verona.se \
    --to=joakim@verona.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.