From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#29785: [PATCH] Implement separate eww history Date: Wed, 20 Dec 2017 12:56:53 +0100 Message-ID: <87k1xhy5mi.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1513770983 4361 195.159.176.226 (20 Dec 2017 11:56:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 20 Dec 2017 11:56:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 29785@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 20 12:56:19 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRcyw-0000UW-S3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Dec 2017 12:56:19 +0100 Original-Received: from localhost ([::1]:48201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRd0s-0002Hx-3t for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Dec 2017 06:58:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRd0g-0002GJ-KA for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 06:58:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRd0c-0007Bx-I8 for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 06:58:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34525) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRd0c-0007Bl-Dt for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 06:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eRd0c-00018Y-7H for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 06:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Dec 2017 11:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15137710284301 (code B ref -1); Wed, 20 Dec 2017 11:58:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Dec 2017 11:57:08 +0000 Original-Received: from localhost ([127.0.0.1]:43206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRczj-00017J-My for submit@debbugs.gnu.org; Wed, 20 Dec 2017 06:57:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eRczh-00016p-K3 for submit@debbugs.gnu.org; Wed, 20 Dec 2017 06:57:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRczb-0006N8-Ce for submit@debbugs.gnu.org; Wed, 20 Dec 2017 06:57:00 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43921) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRczb-0006Mw-8D for submit@debbugs.gnu.org; Wed, 20 Dec 2017 06:56:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRczZ-0001rl-S6 for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 06:56:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRczY-0006KG-P4 for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 06:56:57 -0500 Original-Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:46289) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRczY-0006JQ-Gb for bug-gnu-emacs@gnu.org; Wed, 20 Dec 2017 06:56:56 -0500 Original-Received: by mail-wm0-x234.google.com with SMTP id r78so9393903wme.5 for ; Wed, 20 Dec 2017 03:56:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:gmane-reply-to-list:date:message-id:user-agent :mime-version; bh=wJe19Ve3JEGV2YB0dFJMFP/gH3YzMaN31t6kp9Lyrmg=; b=skf8VXaAKAiVGWpxp9Dtq5Qw4A+YbQ/hX5Rfv7sENXL8w7/Ypaglc9o3B2sFPhkPZy pfBloqPtICUla9krAn2sNxWmtlsX1YcDp7CKPaV6eqi3BH7B5CjTf3p4933DxAq+5L30 L0XYFFNXH5YIyEjB6HTFNcacrJfwfq96phNeYJjGmhbdb2UiaZYruJerOb5z/q8UxZOO yxHk6IQnINKuocKkjBcstp5IpJnha1BvhImCfYHDPm0KY6i4+j1o28FqsE0qT0jIhIcT 90RAi/GZXnQRURNTl4za6Gjg5O9QEO8hpfM83UawnQWGNVVTuH7urP+hZFzWHcK3Ocg+ SyuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:gmane-reply-to-list:date :message-id:user-agent:mime-version; bh=wJe19Ve3JEGV2YB0dFJMFP/gH3YzMaN31t6kp9Lyrmg=; b=b7WVwyp2KuNmwGm3FSf5RbLjPi3fdrFwAgyJOI/blF3/906bKwnuYAYZ/os80ZmTzx 1czbTboh6C/eJYfUSZ0jV1dViVPruSx6WOKo7Njhif7A7hN6gswsyLp43IEX9xU92xLs 8C+BVrunaRTp6GlmFuFvtRLVKksCOZEyORvmcEnEakXAGL3RcoDJZfRCgeFpOQSw+dxz iTmjeoSXO2KEpxsO9RrgPv8Ip/LmZEBejU/SgLY7T3aqokIPES4kTRQLjYuDyTkqqYD/ 427h5dRD/tAXErI6gL8auTihyq7Uni1t/TW+sCpTMgni1QOU28DJjIDCqjID1w68uPoA f//Q== X-Gm-Message-State: AKGB3mKF+OPJPLSMJKdRXY8wV2tnXOaG3Fn1oPFnTxvRxTyp+aOmrqhe qupnNjpoKx7qZKybfRcjY2LHCuCsUV8= X-Google-Smtp-Source: ACJfBosWnwm9MnM5hMb7+zce1snzRoTXiuk0HqcIdWpVNRX/sRgDQts0Y5y1G9lC1I7NSJV/ZECjZw== X-Received: by 10.80.146.81 with SMTP id j17mr5003322eda.159.1513771014833; Wed, 20 Dec 2017 03:56:54 -0800 (PST) Original-Received: from rpluim-ubuntu ([2a01:e34:ecfc:a860:d1d0:358:2cae:ab7b]) by smtp.gmail.com with ESMTPSA id f53sm14729499ede.86.2017.12.20.03.56.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Dec 2017 03:56:53 -0800 (PST) Gmane-Reply-To-List: yes X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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" Xref: news.gmane.org gmane.emacs.bugs:141288 Archived-At: --=-=-= Content-Type: text/plain It's always bugged me that eww uses the minibuffer history when reading which url to open. Attached a patch to enable an optional separate history. I'm assuming this would target 27.1 Regards Robert --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Add-support-for-eww-url-history.patch >From e805d28d8ef16db59347f44faf39fde5fd329fc6 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 25 Oct 2017 15:20:34 +0200 Subject: [PATCH] Add support for eww url history * doc/misc/eww.texi (Basics): Document eww-separate-history * etc/NEWS : Add documentation for eww-separate-history * lisp/net/eww.el (eww-separate-history): Define. (eww): Use it. --- doc/misc/eww.texi | 6 ++++++ etc/NEWS | 4 ++++ lisp/net/eww.el | 12 +++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index e9b544fbde..7fc6b068d9 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -85,6 +85,12 @@ Basics either prefix the file name with @code{file://} or use the command @kbd{M-x eww-open-file}. +@vindex eww-separate-history +@cindex eww + If you want to keep the history of URI's you've opened separate from +the default minibuffer history, set @code{eww-separate-history} to +@code{t} + @findex eww-quit @findex eww-reload @findex eww-copy-page-url diff --git a/etc/NEWS b/etc/NEWS index 784c608041..df1520566a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -900,6 +900,10 @@ bigger than the current window). avoid accidentally accessing remote links may rebind 'w' and 'u' in 'eww-link-keymap' to it. ++++ +*** The new user variable 'eww-separate-history' causes eww to use a +separate minibuffer history if non-nil + ** Ido --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index bff592c3fe..b480710b98 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -113,6 +113,15 @@ eww-restore-reload-prompt :group 'eww :type 'string) +(defcustom eww-separate-history nil + "If t, keep the URI history separate from the minibuffer history. +If nil, use the default minibuffer history list when prompting +for a URI. Note that this history is only used when prompting, +it is separate from those used by `eww-list-histories'." + :version "27.1" + :group 'eww + :type 'boolean) + (defcustom eww-history-limit 50 "Maximum number of entries to retain in the history." :version "25.1" @@ -218,6 +227,7 @@ eww-valid-certificate (defvar eww-data nil) (defvar eww-history nil) (defvar eww-history-position 0) +(defvar eww-uri-history nil) (defvar eww-local-regex "localhost" "When this regex is found in the URL, it's not a keyword but an address.") @@ -250,7 +260,7 @@ eww (prompt (concat "Enter URL or keywords" (if uris (format " (default %s)" (car uris)) "") ": "))) - (list (read-string prompt nil nil uris)))) + (list (read-string prompt nil (and eww-separate-history 'eww-uri-history) uris)))) (setq url (eww--dwim-expand-url url)) (pop-to-buffer-same-window (if (eq major-mode 'eww-mode) -- 2.15.0.276.g89ea799ff --=-=-=--