[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Immediate completion help in minibuffer for specific commands
From: |
Jake |
Subject: |
Immediate completion help in minibuffer for specific commands |
Date: |
Tue, 14 Jan 2025 11:55:31 +0000 |
Hello
It could be convenient for certain commands that prompt for minibuffer input to immediately display the possible completions. A new variable could be added that would be a list of interactive commands that immediately invoke `minibuffer-completion-help'.
Here's an example implementation:
(defcustom commands-immediate-completion-help nil
"List of interactive commands that immediately invoke `minibuffer-completion-help'."
:type '(repeat (symbol :tag "Command"))
:group 'minibuffer)
(defun invoke-completion-help-maybe ()
"Invoke `minibuffer-completion-help' if current command is an element of `commands-immediate-completion-help'."
(when (and commands-immediate-completion-help
(memq this-command commands-immediate-completion-help))
(minibuffer-completion-help)))
(add-hook 'minibuffer-setup-hook #'invoke-completion-help-maybe)
The user could then write e.g.:
(setq commands-immediate-completion-help '(switch-to-buffer bookmark-jump))
Is this functionality of interest? Or perhaps it's already available (excluding third-party completion systems)?
Thanks
Jake
- Immediate completion help in minibuffer for specific commands,
Jake <=