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

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



Hello again,

The attached patch covers two suggestion:

1] Function `w3m-cookie' opens in the current tab (buffer), which is
okay for people who remember to back out of the page. My suggestion is
to open the window in a new tab by default.

2] Function `w3m-cookie-clear' isn't coded to be interactive, which
deprives users from clearing cookies simply from the command-line,
which would be a desirable feature. I didn't include code for the
keybinding because I wasn't sure you would find it desirable.

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.

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 should have offered to code that in my earlier e-mail re:
w3m.el, but I forgot. For that case, I looked at the code and it seems
to have some strange use of tail-recursion, so the fix might need to
change the use of that programming idiom.

So that's two offers, for discussion. Get me when I'm available.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
--- -	2017-06-12 17:01:48.323793519 -0400
+++ ./w3m-cookie.el	2017-06-12 08:47:29.430644439 -0400
@@ -410,6 +410,7 @@
 
 (defun w3m-cookie-clear ()
   "Clear cookie list."
+  (interactive)
   (setq w3m-cookies nil))
 
 (defun w3m-cookie-save (&optional domain)
@@ -508,7 +509,7 @@
 (defun w3m-cookie (&optional no-cache)
   "Display cookies and enable you to manage them."
   (interactive "P")
-  (w3m-goto-url "about://cookie/" no-cache))
+  (w3m-goto-url-new-session "about://cookie/" no-cache))
 
 ;;;###autoload
 (defun w3m-about-cookie (url &optional no-decode no-cache post-data &rest args)