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

Re: [PATCH] w3m-cookie & w3m-cookie-clear



In [emacs-w3m : No.12691]
On Tue, 13 Jun 2017 02:04:34 -0400, Boruch Baum wrote:
>> How about M-<DEL>, i.e., the Lisp form [(meta delete)] ?

> It seems too generic. For instance, many browsers have options to also
> delete history, which I haven't yet found in w3m (does it exist yet?),

There are the `w3m-history-minimize' command and the user option
`w3m-history-minimize-in-new-session' already.  See the docs.

> and there may be other data that could be options for deletion. Maybe
> use M-<DEL> as keybinding prefix, so M-<DEL> k could be delete
> cookies, M-<DEL> s could be delete history, and there would be
> flexibility to add other options.

Agreed.

>>> 2.1] On a related point: If you want, I would be willing to code a
>>> feature to selective delete specific cookies. There are several ways
>>> this could be done: a] It could be a command line selection similar to
>>> what we did recently with `C-u f' for toggling individual filters; b]
>>> It could be an added feature to the current `w3m-cookie' buffer; c] It
>>> could be a separate screen for just deleting cookies, using the
>>> keybinding conventions of the emacs Ibuffer, so that multiple entries
>>> can be selected for deletion, and then actually deleted with a
>>> separate keybinding.

>> I've never thought about it but it sounds good.

> What would be your desired implementation?

I have no plan since I have no concern with cookies so much, hehe.
But the way of Firefox might be good (plan b]?).  For example,

1) A user can limit the cookies to show to the ones of which
   the sites match to the regexp (how to specify the regexp?).
2) `w3m-cookie-clear' deletes only cookies that are shown.
3) The cookie page shows all the remaining cookies after deletion.
4) Optional: implement those features all by the html forms (that
   must be able to be handled by w3m-forms.el of course) of the
   cookie page.

> I'm thinking maybe it should be a feature added to the `w3m-cookie'
> buffer to selectively delete single cookies or groups of cookies (d to
> select a cookie for deletion, and x to perform the deletion after
> confirmation).

Looks good, too.  It would meet Emacs' convention.

>>> BTW - This is a feature I would very much like for deleting multiple
>>> tabs instead of having to repeatedly answer the y/n prompt for each
>>> deletion.

>> I found no `y-or-n-p' or the like in `w3m-delete-buffer', though
>> it's not a matter.  The feature deleting not only multiple tabs
>> but also multiple items in `w3m-select-buffer' would be nice.
>> I guess doing it in only `w3m-select-buffer' is easier and enough.

> Ooops. I mis-wrote. I was referring to the session selection feature
> (M-s by default),

Oh, I totally forgot there's the session selection feature.

> but I agree that the interface should have
> consistency over all similar features, so the same should exist for
> `w3m-select-buffer'. Also, it could be that it was in the session
> selection code that I saw all the unusual use of tail recursion. I was
> looking to see what would be involved in adding a feature to manually
> select which tabs in a saved or crashed session to recover / load. I
> was in a rush and was dealing with a crashed session of 83 buffers, so
> I just copied the session file and turned it to a list of urls, and
> manually loaded the few I actually needed right away.