From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: eww and bookmarks Date: Sun, 24 May 2020 14:06:40 -0500 Message-ID: <87k1119mpr.fsf@red-bean.com> References: <87k1163jz5.fsf@gmail.com> <87zha21i17.fsf@gmail.com> <87pnau45wp.fsf@web.de> <87pnatlo1h.fsf@gmail.com> Reply-To: Karl Fogel Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="107596"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: michael_heerdegen@web.de, Matthias Meulien , npostavs@gmail.com, drew.adams@oracle.com, emacs-devel@gnu.org To: ams@gnu.org (Alfred M. Szmidt) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 24 21:07:17 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 1jcvxt-000RsI-C2 for ged-emacs-devel@m.gmane-mx.org; Sun, 24 May 2020 21:07:17 +0200 Original-Received: from localhost ([::1]:41128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcvxs-0002RT-D7 for ged-emacs-devel@m.gmane-mx.org; Sun, 24 May 2020 15:07:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcvxR-0001w8-He for emacs-devel@gnu.org; Sun, 24 May 2020 15:06:49 -0400 Original-Received: from newsp.red-bean.com ([45.79.25.59]:50896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcvxQ-0004Ed-5C; Sun, 24 May 2020 15:06:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=red-bean.com; s=202005newsp; h=Content-Type:MIME-Version:Message-ID:Date: Reply-To:References:In-Reply-To:Subject:Cc:To:From:Sender: Content-Transfer-Encoding:Content-ID:Content-Description; bh=T0CtBNc6utG8ESReD/DHeKYgp9IBJATyt1LMnBQ1Vko=; t=1590347205; x=1591556805; b=CQpc/OUb92z8pVl8sjohrUEZX+SC+/eNw00wwzLeBd+hsY8GfMc9s9mWGy8yLC+pk3uBD29MTw Pk4zaUnYAu65X1dB01QES4KxWIFUjBXDbqyhBEIYUjBp896fcEj7IfqZ7XlMxPceHhSeCBKZF/5HJ Gj4cMzc7UoMh7FLPj7kAqo7IXMA26u+YXGGJunOE2f95L7pamEakYCXc7g061Y7zTtS3clIFKs1oL DN8sM8cX1NkDifY+TsEhlrln+PHvL8vHjrw6vV1osCHH6E790oYBHXOUSvM9nZr+Cmgfh9+ppFVFE QB2ntLtzeiKxVm2MymMBNacfGZCwsXf34ATfA==; Original-Received: from 99-112-125-163.lightspeed.cicril.sbcglobal.net ([99.112.125.163]:44392 helo=floss) by newsp.red-bean.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jcvxK-00082D-1v; Sun, 24 May 2020 19:06:42 +0000 In-Reply-To: (Alfred M. Szmidt's message of "Sun, 24 May 2020 10:14:02 -0400") Received-SPF: pass client-ip=45.79.25.59; envelope-from=kfogel@red-bean.com; helo=newsp.red-bean.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/24 15:06:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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:251332 Archived-At: On 24 May 2020, Alfred M. Szmidt wrote: >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. I've been watching this thread, trying to determine if any new functionality would need to be added to bookmark.el in order to support EWW bookmarks. So far, it looks like it can all be implemented using existing functionality in bookmark.el, using `bookmark-make-record-function' and a handler function, as per above. If it turns out that anything new is needed, please say so. bookmark.el should be able to supply generic bookmarking functionality to other packages, and I'm happy to help with that if further extension is needed. Best regards, -Karl