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

Re: [UPDATE] site filter functions for slashdot.org and rt.com



In [emacs-w3m : No.12678]
On Mon, 12 Jun 2017 00:35:24 -0400, Boruch Baum wrote:
> Attached are my latest versions of the site filters that I initially
> submitted last week. You may recall that the initial versions were
> written for those sites' articles pages, not those sites' home pages
> and index pages. The current versions addresses that, improves
> visibilty and readabilty and navigation.

> At this point, I would welcome feedback. If there is no feedback, my
> plan is to wait a few days, and then take a fresh look at the code to
> see if I can prettify and optimize it.

How big they are!  I can hardly imagine those filters keep working
for a long time. ;)  But it's ok,  I've committed those updates.

> (defun w3m-filter-rt (url)
[...]
>        (re-search-forward "<a\[^>\]+>\\(<img\[^>\]+>\\)</a>" p t)

I've replaced things like "\[^>\]" with "[^>]".

> (defun w3m-filter-slashdot (url)
[...]
>   (while (re-search-forward "<ul id=\"group_\[^>\]+>\n\t+<li id=\"hiddens_\[0-9\]+\" class=\"hide\"></li>\n</ul>" nil t)
>     (replace-match ""))

Do TABs really exist in the html source?  (committed as is).

>   (while (re-search-forward "\\( beneath your current threshold.\\)</b></noscript>" nil t)

Shouldn't "." be quoted as "\\."?  (committed as is).