From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#19031: 24.4; find-file in icomplete-mode shows completions with no input Date: Tue, 08 Dec 2020 21:11:25 +0200 Organization: LINKOV.NET Message-ID: <87v9dc6sia.fsf@mail.linkov.net> References: <864mu464pa.fsf@beta.iola.dk> <87r1o5luz9.fsf@gnus.org> <878sabf6fu.fsf@gnus.org> <87zh2o7krj.fsf@mail.linkov.net> <83o8j471m9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16222"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: olau@iola.dk, larsi@gnus.org, 19031@debbugs.gnu.org To: Andrii Kolomoiets Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 08 20:35:47 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmim2-00045x-Hc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 20:35:46 +0100 Original-Received: from localhost ([::1]:59650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmim1-0005r2-Ej for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 14:35:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmiYl-0003CG-JG for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 14:22:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmiYk-0000kR-9q for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 14:22:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmiYk-0004dl-5o for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 14:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2020 19:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19031 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 19031-submit@debbugs.gnu.org id=B19031.160745526517753 (code B ref 19031); Tue, 08 Dec 2020 19:22:02 +0000 Original-Received: (at 19031) by debbugs.gnu.org; 8 Dec 2020 19:21:05 +0000 Original-Received: from localhost ([127.0.0.1]:59825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmiXo-0004cH-Sz for submit@debbugs.gnu.org; Tue, 08 Dec 2020 14:21:05 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:57123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmiXn-0004bG-GW for 19031@debbugs.gnu.org; Tue, 08 Dec 2020 14:21:04 -0500 X-Originating-IP: 91.129.99.98 Original-Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id A7A6060005; Tue, 8 Dec 2020 19:20:55 +0000 (UTC) In-Reply-To: (Andrii Kolomoiets's message of "Tue, 08 Dec 2020 18:16:10 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195434 Archived-At: >> 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.