[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 10:51:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> 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.
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 676917b9da..47bd8f90a4 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -579,7 +579,10 @@ icomplete-exhibit
(goto-char (point-max))
; Insert the match-status information:
(when (and (or icomplete-show-matches-on-no-input
- (> (icomplete--field-end) (icomplete--field-beg)))
+ (if (stringp minibuffer-default)
+ (/= (icomplete--field-end) (+ (icomplete--field-beg)
+ (length
minibuffer-default)))
+ (> (icomplete--field-end) (icomplete--field-beg))))
(or
;; Don't bother with delay after certain number of chars:
(> (- (point) (icomplete--field-beg))
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Lars Ingebrigtsen, 2020/12/04
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Andrii Kolomoiets, 2020/12/04
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Lars Ingebrigtsen, 2020/12/06
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Ole Laursen, 2020/12/07
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input,
Juri Linkov <=
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Andrii Kolomoiets, 2020/12/08
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Lars Ingebrigtsen, 2020/12/08
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Eli Zaretskii, 2020/12/08
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Andrii Kolomoiets, 2020/12/08
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Ole Laursen, 2020/12/08
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Juri Linkov, 2020/12/08
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Andrii Kolomoiets, 2020/12/08
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Juri Linkov, 2020/12/09
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Andrii Kolomoiets, 2020/12/10
- bug#19031: 24.4; find-file in icomplete-mode shows completions with no input, Juri Linkov, 2020/12/14