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

"threaded" list of w3m buffers



Hello!

I've written some weird hacks for the user to be able to handle hundreds
of loaded web pages within Emacs and w3m.el.  You might think of it as
the natural evolution of tabbed browsing.

Please see this screenshot to understand immediately what i'm talking
about: http://ignotus.linuxforum.hu/rk-w3m.png (40kB).

I've a session handler, so upon Emacs exit it saves what URLs are
loaded and loads them back at next Emacs start upon user request.

It's basically a brutalized and ridiculously misused ibuffer.el listing
w3m buffers.  Notice how the buffers are sorted, how the linked pages
find their parents resembling somehow how mail gets threaded in your
MUA.

For those who missed / didn't bother with the screenshot here is a
little example:

,----[ buffer *w3m-buffers* ]
| {done}Links to participants - ICFP Programming Contest 2002 [ogi] *#
|   ICFP 2002 Entry: Team 4am [ogi] *w3m*<3>                              
|   @99% Watt's ICFP 2002 Entry [cartan] *w3m*<90>                              
|   Aqua Team Hunger Farce : Frylock Entry [performancedrivers] *w3m*#
|     {8.6%}ICFP Programming Contest 2002 [/. nl] *w3m*<21>                
|     @72 ICFP 2002 Programming Contest Entry [ogi] *w3m*<76>              
| OpinionJournal - Featured Article [a.p.economics] *w3m*<147>             
|   OpinionJournal - from The Wall Street Journal Editorial Page [a.p#
`----

The @99% etc numbers are where is the point currently in those buffers.
These positions are saved upon user request after M-x kill-emacs.  There
is one {49%}, thats a 'bookmark' position (I call them 'reading points')
I set previously, in that buffer that line has a special face, so you
can read a huge page and continue the other day and you'll know where
you left off previously.  (That {done} thing at the top simply means
{100%}.)

Those [...] marks from where an URL came.  So when I read the daily
slashdot newsletter and load a page from there then [/. nl] gets added
as the "source of URL".  It's pretty cool because when you have 400 w3m
buffers it's more easy to remember "wtf is this or that".

You can specify the format of these sources dinamically, an example from
RL: (As you can see currently a source can be a (Gnus) article, another
web page or a wiki-file.)

,----
| (setq ign-rus-format
|       '(case source-type
|         ('article (cond ((string-match "newsletters" newsgroup)
|                          (cond ((string-match "CNN" from)
|                                 (concat (match-string 0 from)
|                                         " nl"))
|                                ((string-match "slashdot" from)
|                                 "/. nl")
|                                ((string-match "Bruce Schneier" from)
|                                 "CRYPTO-GRAM")
|                                (t
|                                 "newsletters")))
|                         ((string-match "mbox" newsgroup)
|                          "mbox")
|                         (t
|                          (gnus-short-group-name newsgroup))))
|         ('web-page (ign-url-domain url))
|         ('wiki-file file-name)))
`----

When in a w3m buffer you put your point over a link, in the echo area
you'll not only see the link but whether is it loaded in another buffer
or isn't, do you have "reading point" on that link or have not; I find
that pretty convenient too, especially when you read an online
encyclopedia or other heavily hyperlinked material and just from the URL
you can't figure out if you've read that already or haven't.

Those funky alternating colors helps to see faster what chunk of pages
belong to each other, this "fruit salad" is really cool and lots of
thought has gone into the logic of it.

I plan -- in the not too distant future -- cleaning up the code a bit
and then put it on my web page as a custom extension to w3m and ibuffer
for those weirdo geeks like me but I wonder, maybe you would like it (or
parts of it) to be part of w3m officially.

-- 
ignotus
                  What a person wills and not what they know determines their
              worth or unworth, power or impotence, happiness or unhappiness.