unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29785: [PATCH] Implement separate eww history
@ 2017-12-20 11:56 Robert Pluim
  2017-12-20 12:20 ` Lars Ingebrigtsen
  2017-12-20 16:17 ` Eli Zaretskii
  0 siblings, 2 replies; 16+ messages in thread
From: Robert Pluim @ 2017-12-20 11:56 UTC (permalink / raw)
  To: 29785

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-support-for-eww-url-history.patch --]
[-- Type: text/x-diff, Size: 2775 bytes --]

From e805d28d8ef16db59347f44faf39fde5fd329fc6 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
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


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-04-13 10:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20 11:56 bug#29785: [PATCH] Implement separate eww history Robert Pluim
2017-12-20 12:20 ` Lars Ingebrigtsen
2017-12-20 12:23   ` Robert Pluim
2017-12-20 16:02     ` Eli Zaretskii
2017-12-20 16:50       ` Robert Pluim
2017-12-20 18:43         ` Eli Zaretskii
2017-12-20 19:01           ` Robert Pluim
2017-12-20 20:14             ` Eli Zaretskii
2017-12-21  8:25               ` Robert Pluim
2018-04-12 22:30                 ` Lars Ingebrigtsen
2018-04-13 10:21                   ` Robert Pluim
2017-12-20 16:17 ` Eli Zaretskii
2017-12-20 16:36   ` Robert Pluim
2017-12-20 16:54     ` Eli Zaretskii
2017-12-20 17:27       ` Robert Pluim
2017-12-20 18:58     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).