From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenjiro NAKAYAMA Newsgroups: gmane.emacs.bugs 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 Message-ID: <87haazxtwq.fsf@dhcp-193-97.nrt.redhat.com> References: <87ppq0txqo.fsf@dhcp-193-97.nrt.redhat.com> <20131122.122659.378621581576481664.yamato@redhat.com> <87r4a88lbf.fsf@flea.lifelogs.com> <87txf1j0ev.fsf@dhcp-193-97.nrt.redhat.com> <87bo18351z.fsf@flea.lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385466795 28022 80.91.229.3 (26 Nov 2013 11:53:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Nov 2013 11:53:15 +0000 (UTC) Cc: Kenjiro NAKAYAMA , 15966@debbugs.gnu.org, 15967@debbugs.gnu.org, 15965@debbugs.gnu.org, 15910@debbugs.gnu.org, Kenjiro NAKAYAMA To: Ted Zlatanov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 26 12:53:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VlHCg-0005ED-3I for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Nov 2013 12:53:18 +0100 Original-Received: from localhost ([::1]:58049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlHCf-0003SC-Od for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Nov 2013 06:53:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlHCW-0003PP-G1 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 06:53:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlHCR-0008Hg-MB for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 06:53:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlHCR-0008Hc-Ja for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 06:53:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VlHCR-00012c-B1 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 06:53:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kenjiro NAKAYAMA Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Nov 2013 11:53:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15966 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15966-submit@debbugs.gnu.org id=B15966.13854667303917 (code B ref 15966); Tue, 26 Nov 2013 11:53:03 +0000 Original-Received: (at 15966) by debbugs.gnu.org; 26 Nov 2013 11:52:10 +0000 Original-Received: from localhost ([127.0.0.1]:45473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VlHBZ-000110-Md for submit@debbugs.gnu.org; Tue, 26 Nov 2013 06:52:10 -0500 Original-Received: from mx1.redhat.com ([209.132.183.28]:28909) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VlHBT-00010D-90; Tue, 26 Nov 2013 06:52:04 -0500 Original-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAQBq0r8023039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 26 Nov 2013 06:52:00 -0500 Original-Received: from dhcp-193-97.nrt.redhat.com (ovpn-116-21.sin2.redhat.com [10.67.116.21]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rAQBpoPU016999 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 26 Nov 2013 06:51:57 -0500 User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.3 In-reply-to: <87bo18351z.fsf@flea.lifelogs.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:80980 Archived-At: Thanks, Ted. I consolidated the patches, please include the patch if appreciated. Signed-off-by: Kenjiro NAKAYAMA * 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 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 > > KN> * net/eww.el (eww-bookmark-browse): Use 'eww-browse-url'. > > On Sun, 24 Nov 2013 23:41:44 +0900 Kenjiro NAKAYAMA 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 > > KN> * net/eww.el (eww-add-bookmark): ask confirmation when add to bookmarks > > On Sun, 24 Nov 2013 23:12:47 +0900 Kenjiro NAKAYAMA 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 > > KN> * net/eww.el (eww-quit): ask confirmation before quitting eww > > On Mon, 25 Nov 2013 00:57:33 +0900 Kenjiro NAKAYAMA 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.