GNU bug report logs - #16280
24.3.50; [PATCH] eww: Add new function to clean browser histories.

Previous Next

Package: emacs;

Reported by: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>

Date: Sat, 28 Dec 2013 15:34:01 UTC

Severity: wishlist

Tags: patch

Found in version 24.3.50

Fixed in version 24.4

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>
To: 16280 <at> debbugs.gnu.org
Subject: bug#16280: 24.3.50; [PATCH] eww: Add new function to clean browser histories.
Date: Sun, 29 Dec 2013 00:32:12 +0900
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 <at> 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




This bug report was last modified 11 years and 143 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.