[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62800: [PATCH] eww: Use completion in URL/keyword prompt.
From: |
Antero Mejr |
Subject: |
bug#62800: [PATCH] eww: Use completion in URL/keyword prompt. |
Date: |
Thu, 13 Apr 2023 01:31:43 +0000 |
Eshel Yaron <me@eshelyaron.com> writes:
>> - (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'.
Good point. The attached v2 patch creates a new keymap called
"eww-minibuffer-url-keymap" with "SPC" and "?" bound to
self-insert-command, and uses that map for the URL/keyword prompt.
Rebinding minibuffer-local-completion-map is done in a few places in the
code. It is also suggested in the manual (49.3.4 Minibuffer Keymaps),
and was already in my init file, which is why I didn't notice the
problem.
It would be nice if there was a single keymap along the lines of
"minibuffer-local-text-completion-map" that can be used for all those
existing cases, and for completion in commands like "M-x rgrep". But
that is a bigger change and beyond the scope of this patch.
v2-0001-eww-Enable-completion-in-URL-keyword-prompt.patch
Description: Text Data
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Antero Mejr, 2023/04/12
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Juri Linkov, 2023/04/12
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Juri Linkov, 2023/04/13
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Antero Mejr, 2023/04/13
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Eli Zaretskii, 2023/04/22
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Antero Mejr, 2023/04/23
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Eli Zaretskii, 2023/04/23
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Eli Zaretskii, 2023/04/24
- bug#62800: [PATCH] eww: Use completion in URL/keyword prompt., Eli Zaretskii, 2023/04/25