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

Re: w3m-filter-delete-regions feature enhancements (patch included)



On 2017-05-30 17:23, Katsumi Yamaoka wrote:
> In [emacs-w3m : No.12655]
> On Mon, 29 May 2017 21:57:19 -0400, Boruch Baum wrote:
> > (defun my-w3m-filter-delete-regions (url start end &optional without-start without-end use-regex)
> >   "Delete regions surrounded with a START pattern and an END pattern.
>
> >   If argument WITHOUT-START is t, do not delete START strings.
> >   If argument WITHOUT-END is t, do not delete the END strings.
> >   If argument USE-REGEX is t, treat START and END as REGEXes"
>
> Sorry, I'm negative to introduce such a function to emacs-w3m
> because:

Here are my counter-arguments:

> ・Though `w3m-filter-delete-regions' might used to have been
>   useful when emacs-w3m was appearing, I don't think it's so
>   effective nowadays.  Web contents are always liquid.  For
>   instance, many of shimbun modules that filter out ads using
>   a similar function are now not working.

While it is true that many sites do change their formats:

1] Such is not true for many (very popular) sites. For any site that
you provide as an example, I could provide counter-examples of very
popular sites that go unchanged for years (eg. slashdot.org,
debian.org, wikipedia.org)

2] For any one site, it is uneconomical to continuously be changing
their formats.

3] Regarding your particular example of shimbun ad filters; although
I'm not familiar with shimbun:

3.1] Ad filters are always going to special cases, because that's
where the money is, and where the motivation is always to be fighting
ad-blockers.

3.2] I defer to you that you know they are changing often enough to be
burden to support instead of just once many years ago.

> ・I think it would be better for a user to create one's custom
>   filter function dedicated to a certain purpose.

But the submission isn't a new function. It just adds generic
functionality to a pre-existing function of the package, and as such
just helps users create filters (BTW, I also have a similar patch
pending for `w3m-replace-regexp' ...).

> ・Emacs-w3m is not a collection of function usage examples.

1] My modification wasn't adding a function, just improving an
existing one (and I have a similar tweak to function
`w3m-filter-replace-regex' if, in the end, you agree to accept them).

2] I know the package has existed for many years and I'm new to it,
but it seems that in the past it did include usage examples. The
package does include a set of specific filters, including the shimbun
example you cited previously. There is also a feature 'antenna' which
I haven't yet figured out.

3] Maybe the package SHOULD include a collection of useful filters for
common sites. It would demonstrate the usefulness of the notion of
filters, and might attract more user and developer interest.


END NOTE: Emacs-w3m may be an old package, but as of about 2 years ago
when I last checked, it was still the best emacs package for web
browsing. The package is mature, and does its job well, but there's
always room for tweaks, continued development, improved documentation
- and I think emacs-w3m is worth the effort.


--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0