From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron 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: Thu, 13 Apr 2023 00:43:42 +0300 Message-ID: References: <87o7ntc6pp.fsf@mailbox.org> <86v8i1x86z.fsf@mail.linkov.net> <87jzygdgwe.fsf@mailbox.org> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24932"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: antero@mailbox.org, juri@linkov.net 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 23:44:26 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 1pmiGP-0006Ez-Nx for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Apr 2023 23:44:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmiG5-00085I-HX; Wed, 12 Apr 2023 17:44: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 1pmiG4-000851-Fx for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 17:44:04 -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 1pmiG2-0006AR-Bo for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 17:44:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmiG2-0001oD-87 for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 17:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 21:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62800 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: Antero Mejr via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Antero Mejr , 62800@debbugs.gnu.org, Juri Linkov Original-Received: via spool by submit@debbugs.gnu.org id=B.16813358416940 (code B ref -1); Wed, 12 Apr 2023 21:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Apr 2023 21:44:01 +0000 Original-Received: from localhost ([127.0.0.1]:41982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmiG1-0001np-1O for submit@debbugs.gnu.org; Wed, 12 Apr 2023 17:44:01 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmiFy-0001nh-Rw for submit@debbugs.gnu.org; Wed, 12 Apr 2023 17:44:00 -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 1pmiFy-000830-M6 for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 17:43:58 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmiFw-00069D-K2 for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 17:43:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1681335826; bh=QNYQFKcazBmyJGHJOV7WaIOeWChVz4YLX0SMjIeZRMo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=J/LYjHRXF5LlhpmE3BW7wnoSNw6CmP3044KfHnzTx62g96pLAUoiPaAgPooacGkI5 5+RtNzwQ4o0P+++yThHL4em//AFesJFH2O4mth0/3RW2TiElMnhx1l4xbHGELS8JhZ Xdb94HD/Cq+T6yxgASIsfB6jfuJM9HfVcoSWgIUZUfQzypOVQuiEboXaJPora1D1PV PdEEH9aMHRTV4zA4aE+1stCzhmOS9ZYeey01C+w8TyGg0WixQffjuTvwpQZ+OVlkO1 jUxkYg4Z1KpNm4iXz270RxeZk6aDwmTHfhp9HkR8FEVfYu0KWbijHsEMcu1LwrNrPy snPE7buyyQ1bw== In-Reply-To: <87jzygdgwe.fsf@mailbox.org> (Antero Mejr via's message of "Wed, 12 Apr 2023 19:44:49 +0000") Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-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:259813 Archived-At: Hi, > - (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) Note that this change doesn't work so well for the use case of inserting space-separated keywords, since it causes SPC to be bound to `minibuffer-complete-word' instead of `self-insert-command'. That means that with this patch, typing M-x eww f o o SPC shows "No match" instead of inserting a space character after "foo". So if one wants to search for "foo bar" they now need to type M-SPC or C-q SPC to separate search words. I definitely agree that it'd be useful to have proper completion in eww's prompt though, ideally without the annoying side effect of changing the behavior of SPC. (Personally, I have a custom version of the eww command that does pretty much the same thing as this patch does, but I'm already used to typing M-SPC instead of SPC every once in a while. Also, I still have the regular M-x eww (and M-s M-w) available if that gets inconvenient.) Cheers, Eshel