From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Antero Mejr via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62800: [PATCH] eww: Use completion in URL/keyword prompt. Date: Wed, 12 Apr 2023 18:10:10 +0000 Message-ID: <87o7ntc6pp.fsf@mailbox.org> Reply-To: Antero Mejr Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37715"; mail-complaints-to="usenet@ciao.gmane.io" To: 62800@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 12 20:11:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pmewB-0009h8-Gd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Apr 2023 20:11:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmevx-0001H9-Bh; Wed, 12 Apr 2023 14:11:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmevv-0001Gt-Ee for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 14:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmevv-0003pS-6W for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 14:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmevu-00046o-Nu for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 14:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62800 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.168132303115744 (code B ref -1); Wed, 12 Apr 2023 18:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Apr 2023 18:10:31 +0000 Original-Received: from localhost ([127.0.0.1]:41766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmevO-00045s-PH for submit@debbugs.gnu.org; Wed, 12 Apr 2023 14:10:31 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmevL-00045f-J8 for submit@debbugs.gnu.org; Wed, 12 Apr 2023 14:10:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmevL-0001EC-2W for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 14:10:27 -0400 Original-Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pmevI-0003fl-Te for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 14:10:26 -0400 Original-Received: from smtp102.mailbox.org (unknown [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4PxW2t2qyxz9sps for ; Wed, 12 Apr 2023 20:10:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1681323014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=uvRVk+CCahOg0lEUH0yQUjyqWGmcelKXbRwvzyK26S0=; b=wzOAj4gHhhVvyaIake2XAlfKg9qGwEBxud5wRsPaGf7z/hGdLxPJzwEQTTmzoYmpPF1MKw a8GoidCm4fzm1wdSYYxmvJpH15iWMwwJMmiW0/4w53bUCnEd0MAbw41OqoLnqvzbkAcIvo WORHCB/PEh811MrGTW9+87omZCAeeH4aDO9w/b/gJ/zNs2oOJvjdg2DGHK6EPqv3curJdb vA3tRvObP9peBQpfXCK1iFWub1bymJH3ktOeb6KFKfPep+KQ/866I0PF6HBMmJAI+lnMUE sAwXVlU3efiCKs4oPyJTCQLoIiGY1io2lGqBqXs60eUpFxWPUs2rX6flwcqOfQ== X-MBO-RS-META: 61oupqjqdtmhr5m65izgtcxjrw15es7a X-MBO-RS-ID: 9891e4189a23e5f2f77 Received-SPF: pass client-ip=2001:67c:2050:0:465::202; envelope-from=antero@mailbox.org; helo=mout-p-202.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259794 Archived-At: --=-=-= Content-Type: text/plain The attached patch adds completion support to the EWW URL prompt (M-x eww). --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-eww-Use-completion-in-URL-keyword-prompt.patch >From 03f566d9e605ecd1008f53572420f52063fc4522 Mon Sep 17 00:00:00 2001 From: Antero Mejr 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 --=-=-=--