* bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories.
@ 2013-12-28 15:32 Kenjiro NAKAYAMA
2014-01-02 2:43 ` Stefan Monnier
2014-01-05 9:32 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 6+ messages in thread
From: Kenjiro NAKAYAMA @ 2013-12-28 15:32 UTC (permalink / raw)
To: 16280
I think this function is simple but sufficient.
Please review and install it to the official tree if appreciated, after Feature freeze.
Signed-off-by: Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>
* net/eww.el (eww-mode-map): Add new key map and easy-menu to
clean up browser histories.
(eww-history-cleanup): New function to cleanup browser histories.
---
lisp/net/eww.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 25309d1..11fcbf1 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -428,6 +428,7 @@ word(s) will be searched for via `eww-search-prefix'."
(define-key map "C" 'url-cookie-list)
(define-key map "v" 'eww-view-source)
(define-key map "H" 'eww-list-histories)
+ (define-key map [(meta c)] 'eww-history-cleanup)
(define-key map "b" 'eww-add-bookmark)
(define-key map "B" 'eww-list-bookmarks)
@@ -448,6 +449,8 @@ word(s) will be searched for via `eww-search-prefix'."
["View page source" eww-view-source]
["Copy page URL" eww-copy-page-url t]
["List histories" eww-list-histories t]
+ ["Clean histories" eww-history-cleanup
+ :active (not (zerop (length eww-history)))]
["Add bookmark" eww-add-bookmark t]
["List bookmarks" eww-list-bookmarks t]
["List cookies" url-cookie-list t]))
@@ -1091,6 +1094,13 @@ Differences in #targets are ignored."
(setq count (1+ count)))
(expand-file-name file directory)))
+(defun eww-history-cleanup ()
+ (interactive)
+ (if (y-or-n-p "clean up browser histories? ")
+ (progn
+ (setq-local eww-history nil)
+ (setq-local eww-history-position 0))))
+
;;; Bookmarks code
(defvar eww-bookmarks nil)
--
1.8.3.1
Regards,
Kenji
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories.
2013-12-28 15:32 bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories Kenjiro NAKAYAMA
@ 2014-01-02 2:43 ` Stefan Monnier
2014-01-05 2:23 ` Kenjiro NAKAYAMA
2014-01-05 9:35 ` Lars Magne Ingebrigtsen
2014-01-05 9:32 ` Lars Magne Ingebrigtsen
1 sibling, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2014-01-02 2:43 UTC (permalink / raw)
To: Kenjiro NAKAYAMA; +Cc: 16280
> (eww-history-cleanup): New function to cleanup browser histories.
FWIW, I think this should explicitly encompass "all traces", including,
cookies, URL history, etc...
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories.
2014-01-02 2:43 ` Stefan Monnier
@ 2014-01-05 2:23 ` Kenjiro NAKAYAMA
2014-01-05 9:35 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 6+ messages in thread
From: Kenjiro NAKAYAMA @ 2014-01-05 2:23 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 16280, Kenjiro NAKAYAMA
> FWIW, I think this should explicitly encompass "all traces", including,
> cookies, URL history, etc...
Yes, You are right.
But since all traces are only cookies and histories, I think it should
encompass separately "Clean ALL", "Clean Cookies" and "Clean Histories".
Kenjiro
monnier@iro.umontreal.ca writes:
>> (eww-history-cleanup): New function to cleanup browser histories.
>
> FWIW, I think this should explicitly encompass "all traces", including,
> cookies, URL history, etc...
>
>
> Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories.
2014-01-02 2:43 ` Stefan Monnier
2014-01-05 2:23 ` Kenjiro NAKAYAMA
@ 2014-01-05 9:35 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-01-05 9:35 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 16280, Kenjiro NAKAYAMA
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> FWIW, I think this should explicitly encompass "all traces", including,
> cookies, URL history, etc...
There's a cookie editor in url.el. It should probably have a command to
delete all cookies instead of just individual cookies, too.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories.
2013-12-28 15:32 bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories Kenjiro NAKAYAMA
2014-01-02 2:43 ` Stefan Monnier
@ 2014-01-05 9:32 ` Lars Magne Ingebrigtsen
2014-01-05 11:07 ` Kenjiro NAKAYAMA
1 sibling, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-01-05 9:32 UTC (permalink / raw)
To: Kenjiro NAKAYAMA; +Cc: 16280
Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com> writes:
> +(defun eww-history-cleanup ()
> + (interactive)
> + (if (y-or-n-p "clean up browser histories? ")
> + (progn
> + (setq-local eww-history nil)
> + (setq-local eww-history-position 0))))
I'm not sure this is useful. The history is only a local buffer
variable, isn't it? The normal way to make stuff "go away" in Emacs is
to kill the buffer, and that should do the trick for the history, too.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories.
2014-01-05 9:32 ` Lars Magne Ingebrigtsen
@ 2014-01-05 11:07 ` Kenjiro NAKAYAMA
0 siblings, 0 replies; 6+ messages in thread
From: Kenjiro NAKAYAMA @ 2014-01-05 11:07 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: 16280, Kenjiro NAKAYAMA
> I'm not sure this is useful. The history is only a local buffer
> variable, isn't it? The normal way to make stuff "go away" in Emacs is
> to kill the buffer, and that should do the trick for the history, too.
Yes, that's right. I agree with you.
This function is not necessary.
Kenjiro
larsi@gnus.org writes:
> Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com> writes:
>
>> +(defun eww-history-cleanup ()
>> + (interactive)
>> + (if (y-or-n-p "clean up browser histories? ")
>> + (progn
>> + (setq-local eww-history nil)
>> + (setq-local eww-history-position 0))))
>
> I'm not sure this is useful. The history is only a local buffer
> variable, isn't it? The normal way to make stuff "go away" in Emacs is
> to kill the buffer, and that should do the trick for the history, too.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-05 11:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-28 15:32 bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories Kenjiro NAKAYAMA
2014-01-02 2:43 ` Stefan Monnier
2014-01-05 2:23 ` Kenjiro NAKAYAMA
2014-01-05 9:35 ` Lars Magne Ingebrigtsen
2014-01-05 9:32 ` Lars Magne Ingebrigtsen
2014-01-05 11:07 ` Kenjiro NAKAYAMA
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.