GNU bug report logs -
#19031
24.4; find-file in icomplete-mode shows completions with no input
Previous Next
Reported by: Ole Laursen <olau <at> iola.dk>
Date: Wed, 12 Nov 2014 16:42:02 UTC
Severity: normal
Tags: fixed
Found in version 24.4
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #27 received at 19031 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
>> I originally reported this because I found it jarring to get a bunch
>> of completions without having entered anything. In my home dir it
>> basically shows me garbage (dot files that I'm never interested in).
>>
>> Would it not be possible to make a difference between the case where
>> find-file provides some default text (current dir) and where I have
>> entered some input? The variable literally says -on-no-input.
>
> I tried to handle this case with the following patch, but it doesn't work
> because read-file-name-default resets `minibuffer-default' to nil,
> so icomplete doesn't know what was initial input in the minibuffer.
1. emacs -Q
2. M-: (setq insert-default-directory nil)
3. M-x icomplete-mode
4. C-x C-f ~/
In this case everything works as described by the docstring: user input
is here so completions are shown. But IMO Ole's issue is not
completely solved: bunch of uninteresting dotfiles are shown.
I was thinking about some method wich will allow to tell that minibuffer
is empty even if there are some user input. From your patch I learned
about the 'minibuffer-default' variable and looks like it can be the
method I was thinking of.
If the 'read-file-name-default' function can set the
'minibuffer-default' variable to the substring of the minibuffer content
from (minibuffer-prompt-end) to the last occurence of the path
separator, then, in addition to the patched 'icomplete-exhibit', this
can give desired result: no completions will be show until some input
after path separator.
WDYT?
This bug report was last modified 4 years and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.