GNU bug report logs -
#15966
24.3.50; [PATCH] eww: ask confirmation when add bookmarks
Previous Next
Reported by: Kenjiro NAKAYAMA <knakayam <at> redhat.com>
Date: Sun, 24 Nov 2013 15:39:03 UTC
Severity: wishlist
Tags: patch
Found in version 24.3.50
Done: Ted Zlatanov <tzz <at> lifelogs.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
eww should ask "yes or no" when add current page to bookmarks, since
only "b" key to add bookmarks is easy to mistake.
(My bookmarklist has amazingly increased.)
Signed-off-by: Kenjiro NAKAYAMA <knakayam <at> redhat.com>
* net/eww.el (eww-add-bookmark): ask confirmation when add to bookmarks
---
lisp/net/eww.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 86e0977..6f09d86 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -964,14 +964,16 @@ The browser to used is specified by the `shr-external-browser' variable."
(when (equal eww-current-url
(plist-get bookmark :url))
(error "Already bookmarked")))
- (let ((title (replace-regexp-in-string "[\n\t\r]" " " eww-current-title)))
- (setq title (replace-regexp-in-string "\\` +\\| +\\'" "" title))
- (push (list :url eww-current-url
- :title title
- :time (current-time-string))
- eww-bookmarks))
- (eww-write-bookmarks)
- (message "Bookmarked %s (%s)" eww-current-url eww-current-title))
+ (if (y-or-n-p "add bookmark this page? ")
+ (progn
+ (let ((title (replace-regexp-in-string "[\n\t\r]" " " eww-current-title)))
+ (setq title (replace-regexp-in-string "\\` +\\| +\\'" "" title))
+ (push (list :url eww-current-url
+ :title title
+ :time (current-time-string))
+ eww-bookmarks))
+ (eww-write-bookmarks)
+ (message "Bookmarked %s (%s)" eww-current-url eww-current-title))))
(defun eww-write-bookmarks ()
(with-temp-file (expand-file-name "eww-bookmarks" user-emacs-directory)
--
1.8.3.1
This bug report was last modified 11 years and 235 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.