unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 62800@debbugs.gnu.org
Cc: antero@mailbox.org, juri@linkov.net
Subject: bug#62800: [PATCH] eww: Use completion in URL/keyword prompt.
Date: Thu, 13 Apr 2023 00:43:42 +0300	[thread overview]
Message-ID: <m1a5zcydwx.fsf@eshelyaron.com> (raw)
In-Reply-To: <87jzygdgwe.fsf@mailbox.org> (Antero Mejr via's message of "Wed,  12 Apr 2023 19:44:49 +0000")

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





  reply	other threads:[~2023-04-12 21:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1a5zcydwx.fsf@eshelyaron.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=62800@debbugs.gnu.org \
    --cc=antero@mailbox.org \
    --cc=juri@linkov.net \
    --cc=me@eshelyaron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).