unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62800: [PATCH] eww: Use completion in URL/keyword prompt.
@ 2023-04-12 18:10 Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-04-12 18:32 ` Juri Linkov
  0 siblings, 1 reply; 13+ messages in thread
From: Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-04-12 18:10 UTC (permalink / raw)
  To: 62800

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


The attached patch adds completion support to the EWW URL prompt (M-x eww).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-eww-Use-completion-in-URL-keyword-prompt.patch --]
[-- Type: text/x-patch, Size: 1753 bytes --]

From 03f566d9e605ecd1008f53572420f52063fc4522 Mon Sep 17 00:00:00 2001
From: Antero Mejr <antero@mailbox.org>
Date: Wed, 12 Apr 2023 17:56:01 +0000
Subject: [PATCH] eww: Use completion in URL/keyword prompt.

* lisp/net/eww.el (eww): Use 'completing-read' when prompting for a URL
or keywords.
* etc/NEWS (EWW): Add NEWS entry for the change.
---
 etc/NEWS        | 5 +++++
 lisp/net/eww.el | 7 ++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 5e1fd76e99e..9f9317d5ea9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -219,6 +219,11 @@ the new argument NEW-BUFFER non-nil, it will use a new buffer instead.
 Interactively, invoke 'eww-open-file' with a prefix argument to
 activate this behavior.
 
++++
+*** 'eww' now has completion when prompting for a URL or keywords.
+The interactive minibuffer prompt when invoking 'eww' now has support
+for completion.
+
 ** go-ts-mode
 
 +++
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 11be20b68db..4e4445b76fa 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -378,9 +378,10 @@ killed after rendering.
 For more information, see Info node `(eww) Top'."
   (interactive
    (let ((uris (eww-suggested-uris)))
-     (list (read-string (format-prompt "Enter URL or keywords"
-                                       (and uris (car uris)))
-                        nil 'eww-prompt-history uris)
+     (list (completing-read (format-prompt "Enter URL or keywords"
+                                           (and uris (car uris)))
+                            eww-prompt-history nil nil nil
+                            'eww-prompt-history uris)
            current-prefix-arg)))
   (setq url (eww--dwim-expand-url url))
   (pop-to-buffer-same-window
-- 
2.39.2


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

end of thread, other threads:[~2023-04-25 14:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 18:10 bug#62800: [PATCH] eww: Use completion in URL/keyword prompt Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-12 18:32 ` Juri Linkov
2023-04-12 19:44   ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-12 21:43     ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-13  1:31       ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-13  6:41         ` Juri Linkov
2023-04-13  6:40     ` Juri Linkov
2023-04-13 17:16       ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-22  9:03         ` Eli Zaretskii
2023-04-23 18:03           ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-23 18:31             ` Eli Zaretskii
2023-04-24 11:56             ` Eli Zaretskii
2023-04-25 14:33             ` Eli Zaretskii

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).