From: Kenjiro NAKAYAMA <knakayam@redhat.com>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>,
15966@debbugs.gnu.org, 15967@debbugs.gnu.org,
15965@debbugs.gnu.org, 15910@debbugs.gnu.org,
Kenjiro NAKAYAMA <knakayam@redhat.com>
Subject: bug#15966: bug#15967: 24.3.50; [PATCH] eww: use eww-browse-url, when url in bookmark list is opened, bug#15966: 24.3.50; [PATCH] eww: ask confirmation when add bookmarks, bug#15965: 24.3.50; [PATCH] eww: ask confirmation before quitting, bug#15910: 24.3.50; [PATCH] eww: Current URL is not entered automatically, after ewwstarts.s.
Date: Tue, 26 Nov 2013 20:51:49 +0900 [thread overview]
Message-ID: <87haazxtwq.fsf@dhcp-193-97.nrt.redhat.com> (raw)
In-Reply-To: <87bo18351z.fsf@flea.lifelogs.com>
Thanks, Ted.
I consolidated the patches, please include the patch if appreciated.
Signed-off-by: Kenjiro NAKAYAMA <knakayam@redhat.com>
* net/eww.el (eww-bookmark-browse): Use 'eww-browse-url'.
(eww-add-bookmark): ask confirmation when add to bookmarks
(eww-quit): ask confirmation before quitting eww
---
lisp/net/eww.el | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 86e0977..4b8b067 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -403,8 +403,10 @@ word(s) will be searched for via `eww-search-prefix'."
(defun eww-quit ()
"Exit the Emacs Web Wowser."
(interactive)
- (setq eww-history nil)
- (kill-buffer (current-buffer)))
+ (if (y-or-n-p "quit eww? ")
+ (progn
+ (setq eww-history nil)
+ (kill-buffer (current-buffer)))))
(defun eww-back-url ()
"Go to the previously displayed page."
@@ -964,14 +966,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)
@@ -1063,7 +1067,7 @@ The browser to used is specified by the `shr-external-browser' variable."
;; just let it remain.
(ignore-errors
(delete-window))
- (eww (plist-get bookmark :url))))
+ (eww-browse-url (plist-get bookmark :url))))
(defun eww-next-bookmark ()
"Go to the next bookmark in the list."
--
1.8.3.1
Thanks,
Kenjiro Nakayama
tzz@lifelogs.com writes:
> Thank you for the patches. All of them are OK to go in IMO (and tiny
> changes). Could you consolidate them in a single patch with a ChangeLog
> please? It can wait for your eww history stack changes or can be
> submitted sooner.
>
> Thanks
> Ted
>
> On Mon, 25 Nov 2013 00:15:52 +0900 Kenjiro NAKAYAMA <knakayam@redhat.com> wrote:
>
> KN> Since eww-bookmark-browse doesn't use eww-browse-url to open its url, it
> KN> doesn't save current URL in eww-history.
>
> KN> Signed-off-by: Kenjiro NAKAYAMA <knakayam@redhat.com>
>
> KN> * net/eww.el (eww-bookmark-browse): Use 'eww-browse-url'.
>
> On Sun, 24 Nov 2013 23:41:44 +0900 Kenjiro NAKAYAMA <knakayam@redhat.com> wrote:
>
> KN> eww should ask "yes or no" when add current page to bookmarks, since
> KN> only "b" key to add bookmarks is easy to mistake.
> KN> (My bookmarklist has amazingly increased.)
>
> KN> Signed-off-by: Kenjiro NAKAYAMA <knakayam@redhat.com>
>
> KN> * net/eww.el (eww-add-bookmark): ask confirmation when add to bookmarks
>
> On Sun, 24 Nov 2013 23:12:47 +0900 Kenjiro NAKAYAMA <knakayam@redhat.com> wrote:
>
> KN> eww should ask "yes or no" before quitting, since only "q" key to quit is
> KN> easy to mistake.
>
> KN> Signed-off-by: Kenjiro NAKAYAMA <knakayam@redhat.com>
>
> KN> * net/eww.el (eww-quit): ask confirmation before quitting eww
>
> On Mon, 25 Nov 2013 00:57:33 +0900 Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com> wrote:
>
> KN> Thank you for your review, Ted, Masatake.
>
> KN> OK, I try to revise the patch to add eww own history stack.
> KN> And I put ChangeLog entry to my report next time.
next prev parent reply other threads:[~2013-11-26 11:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-16 11:03 bug#15910: 24.3.50; [PATCH] eww: Current URL is not entered automatically, after eww starts Kenjiro NAKAYAMA
2013-11-21 16:47 ` Ted Zlatanov
2013-11-22 3:26 ` Masatake YAMATO
2013-11-22 16:15 ` Ted Zlatanov
2013-11-24 15:15 ` bug#15967: 24.3.50; [PATCH] eww: use eww-browse-url, when url in bookmark list is opened Kenjiro NAKAYAMA
2013-11-25 14:54 ` bug#15910: bug#15967: 24.3.50; [PATCH] eww: use eww-browse-url, when url in bookmark list is opened, bug#15966: 24.3.50; [PATCH] eww: ask confirmation when add bookmarks, bug#15965: 24.3.50; [PATCH] eww: ask confirmation before quitting, bug#15910: 24.3.50; [PATCH] eww: Current URL is not entered automatically, after ewwstarts.s Ted Zlatanov
2013-11-26 11:51 ` Kenjiro NAKAYAMA [this message]
2013-11-26 20:10 ` bug#15910: bug#15966: " Ted Zlatanov
2013-11-24 15:57 ` Kenjiro NAKAYAMA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87haazxtwq.fsf@dhcp-193-97.nrt.redhat.com \
--to=knakayam@redhat.com \
--cc=15910@debbugs.gnu.org \
--cc=15965@debbugs.gnu.org \
--cc=15966@debbugs.gnu.org \
--cc=15967@debbugs.gnu.org \
--cc=nakayamakenjiro@gmail.com \
--cc=tzz@lifelogs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.