From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: ams@gnu.org (Alfred M. Szmidt) Newsgroups: gmane.emacs.devel Subject: Re: eww and bookmarks Date: Sun, 24 May 2020 10:14:02 -0400 Message-ID: References: <87k1163jz5.fsf@gmail.com> <87zha21i17.fsf@gmail.com> <87pnau45wp.fsf@web.de> <87pnatlo1h.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="57618"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael_heerdegen@web.de, npostavs@gmail.com, drew.adams@oracle.com, emacs-devel@gnu.org To: Matthias Meulien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 24 16:14:31 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jcrOZ-000EtP-6K for ged-emacs-devel@m.gmane-mx.org; Sun, 24 May 2020 16:14:31 +0200 Original-Received: from localhost ([::1]:39390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcrOY-00021b-96 for ged-emacs-devel@m.gmane-mx.org; Sun, 24 May 2020 10:14:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcrO9-0001be-Cs for emacs-devel@gnu.org; Sun, 24 May 2020 10:14:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60761) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcrO8-0004nh-87; Sun, 24 May 2020 10:14:04 -0400 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jcrO6-0006s1-P0; Sun, 24 May 2020 10:14:03 -0400 In-reply-to: <87pnatlo1h.fsf@gmail.com> (message from Matthias Meulien on Sun, 24 May 2020 10:44:58 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251316 Archived-At: I haven't followed the discussion closely, so might have missed things -- the addition of bookmarks for URLs would be very nice. Isn't this very easily done though, both so that it works for the case of eww, but also (which I think is important, in the generic case), simple untested hackery, in .emacs.bmk we have: ("The GNU Operating System and the Free Software Movement" (url . "http://www.gnu.org/") (handler . browse-url-bookmark-jump)) Then browse-url-bookmark-jump is simply: (defun browse-url-bookmark-jump (bmk) (let* ((url (bookmark-prop-get bmk 'url)) (buf (save-window-excursion (browse-url url) (current-buffer)))) (bookmark-default-handler `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bmk))))) Those that like EWW would already be doing: (setq browse-url-browser-function 'eww-browse-url) And then the equivalent browse-url-bookmark-make-record (e.g, Info-Info-bookmark-make-record) function for setting, which is left as a excersie for the reader -- or I can make a patch. This might not work of course if you are outside of the context of Emacs. It would be strange if eww implemented its own bookmarking functionality, when all of this is already simple to add.