bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19031: 24.4; find-file in icomplete-mode shows completions with no i


From: Juri Linkov
Subject: bug#19031: 24.4; find-file in icomplete-mode shows completions with no input
Date: Tue, 08 Dec 2020 21:11:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> Emacs never filters out the dotfiles, not by default anyway.  Try
>> "C-x C-f TAB TAB", and you will see that.  IMO, it would be confusing
>> if some completion packages did this and some didn't.
>
> Yes.  It's not about filtering out dotfiles but about to make icomplete
> to not show completions until user starts typing filename.

To make icomplete to not show completions until user starts typing filename,
icomplete could remember the initial minibuffer content immediately after its
activation, then after the user edits the minibuffer, compare the new content
with the stored initial one.  So this doesn't require any changes
outside of icomplete.

> If there are no separator in the input, 'minibuffer-default' will be
> empty string and completions will be shown.
>
> Example of desired behavior:
> 1. emacs -Q
> 2. M-x icomplete-mode
> 3. C-x C-f
>    minibuffer content: ~/
>    minibuffer-default is "~/"
>    no completions are shown
> 4. Type ".em"
>    minibuffer content: ~/.em
>    minibuffer-default is "~/"
>    completions are shown
> 5. Type "acs.d/"
>    minibuffer content: ~/.emacs.d/
>    minibuffer-default is "~/.emacs.d/"
>    no completions are shown

I'm not sure if such special casing for directory separators is needed.
The option icomplete-show-matches-on-no-input is quite simple and it
should check if the user changed the initial content.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]