From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#20032: eww: access bookmarks right from the URI prompt Date: Sat, 26 Dec 2015 08:57:41 +0000 Message-ID: <87oaddziwq.fsf@violet.siamics.net> References: <87fv9gzj4e.fsf@violet.siamics.net> <878uf7zsya.fsf@violet.siamics.net> <878u4jdoij.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1451120309 18252 80.91.229.3 (26 Dec 2015 08:58:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Dec 2015 08:58:29 +0000 (UTC) To: 20032@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 26 09:58:18 2015 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 1aCkg3-00089k-Jr for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Dec 2015 09:58:15 +0100 Original-Received: from localhost ([::1]:37939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCkg3-0008LP-1o for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Dec 2015 03:58:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCkfv-0008IS-Py for bug-gnu-emacs@gnu.org; Sat, 26 Dec 2015 03:58:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCkfq-0003Rf-Ru for bug-gnu-emacs@gnu.org; Sat, 26 Dec 2015 03:58:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCkfq-0003Ra-Gc for bug-gnu-emacs@gnu.org; Sat, 26 Dec 2015 03:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aCkfq-0000rS-BV for bug-gnu-emacs@gnu.org; Sat, 26 Dec 2015 03:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Dec 2015 08:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20032 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20032-submit@debbugs.gnu.org id=B20032.14511202813303 (code B ref 20032); Sat, 26 Dec 2015 08:58:02 +0000 Original-Received: (at 20032) by debbugs.gnu.org; 26 Dec 2015 08:58:01 +0000 Original-Received: from localhost ([127.0.0.1]:36732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCkfm-0000rA-24 for submit@debbugs.gnu.org; Sat, 26 Dec 2015 03:58:01 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:60314) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCkfh-0000qx-5H for 20032@debbugs.gnu.org; Sat, 26 Dec 2015 03:57:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=vCLHYam6S88zBfNKm7+s6e/SNtKwB7frif84huzxxyc=; b=YG5Bjjv47IyEU2VnS8xgK84fR0xDqDK1959ylw/51tTKrmCFOl4dw7Srri0BkJmZ4Ej9EAaASCMEJGsM/T8Q8LpzMDQrKcOvh05TImXmF86jD+jSnjWK8Sb6D3/6VR6jfa0gIkYsElOjl2ZrRJIh/myx+QwM3Sl5ztpTupXbJas=; Original-Received: from violet.siamics.net ([2001:470:1f13:1eb::1:1d]) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1aCkfd-0000PI-PB for 20032@debbugs.gnu.org; Sat, 26 Dec 2015 08:57:49 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1aCkfW-0000Ve-SX for 20032@debbugs.gnu.org; Sat, 26 Dec 2015 15:57:42 +0700 In-Reply-To: <878u4jdoij.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 25 Dec 2015 07:35:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:110585 Archived-At: >>>>> Lars Ingebrigtsen writes: >>>>> Ivan Shmakov writes: >> Please consider the revised patch MIMEd. >> * lisp/net/eww.el (eww-suggest-uris): Add eww-suggest-bookmarks to >> the default value and :options. (Bug#20032) >> (eww-suggested-bookmarks-annotation): New customizable variable. >> (eww-suggest-bookmarks, eww-remove-annotation) >> (eww-substring-nil-property): New functions. >> (eww-suggested-uris, eww): Use eww-remove-annotation. > I get a compilation warning after applying the patch... (The defvar > for eww-bookmarks should be moved.) Yes. > But conceptually I'm not sure this is a good idea. If you have a > bookmarks file, then if you say `M-x eww', you will apparently > default to the first entry in the bookmarks file? Indeed; unless the point is on a URI, where you=E2=80=99d get that URI as the default. Speaking of the bookmarks file, eww-suggested-bookmarks is missing a eww-read-bookmarks call in that patch. > That doesn't seem very helpful. Actually, it is: I=E2=80=99ve set the eww-bookmarks variable so that the resources I visit the most often are at the top of the list, and now I can access them with just a few M-ns, or, for the topmost, just RET. > It would be OK to have that as the first entry in the `M-n' history, > but not as the default. If I read the code correctly. I guess that could be fixed by using a modified version of read-string and flagging the values returned by eww-suggest-bookmarks in such a way as to never be considered as the default by that function. I doubt that that=E2=80=99s worth the effort, however. (Unless such a function already exists.) What bothers me more is that the sheer corpus of contemporary software will generally filter the list of bookmarks per the search terms typed in by the user first, and only then present the result for their respective equivalents of M-n. Which gets handy if your bookmarks (or history, or pretty much anything of that kind) number in the hundreds (or more.) I know of no similar facility in the current Emacs, however. --=20 FSF associate member #7257 http://am-1.org/~ivan/ =E2=80=A6 3013 B6A0= 230E 334A