From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.bugs Subject: bug#19031: 24.4; find-file in icomplete-mode shows completions with no input Date: Tue, 08 Dec 2020 18:16:10 +0200 Message-ID: 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="32570"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: olau@iola.dk, larsi@gnus.org, 19031@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 08 17:17:18 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 1kmffy-0008Mi-4c for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 17:17:18 +0100 Original-Received: from localhost ([::1]:49922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmffx-0007EC-1W for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 11:17:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmffj-0007DH-It for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 11:17:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmffh-0005lv-Tv for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 11:17:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmffh-00081Z-Pq for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 11:17:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrii Kolomoiets Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2020 16:17:01 +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.160744418230792 (code B ref 19031); Tue, 08 Dec 2020 16:17:01 +0000 Original-Received: (at 19031) by debbugs.gnu.org; 8 Dec 2020 16:16:22 +0000 Original-Received: from localhost ([127.0.0.1]:59326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmff4-00080V-7B for submit@debbugs.gnu.org; Tue, 08 Dec 2020 11:16:22 -0500 Original-Received: from mail-lj1-f181.google.com ([209.85.208.181]:35692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmff1-0007zu-OD for 19031@debbugs.gnu.org; Tue, 08 Dec 2020 11:16:20 -0500 Original-Received: by mail-lj1-f181.google.com with SMTP id f11so8479636ljn.2 for <19031@debbugs.gnu.org>; Tue, 08 Dec 2020 08:16:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ifKUnxsY1KqOYEyUDBzahqkKURBNdLLezol7uz4v+tQ=; b=TMrImywkjP9yDpX/7/Ks8qoB7qO+qTt4ocx/hwkuUq8iPBnUuNrY9YirdIM7V2d4Yb R1as3wgnjm9YKd+5rGKOPIMuiO2lmlZquwpmn6THaMAfDpq4S4WdOQcBvkQRTrsBbHJ2 DrUnKpaqc3FgE5YTJQoekQ9uZkM98RLwBoBtZwy/cWjcAHrP7QSIpQ8t28AW7NcDwhoa PgEGxtkghGAzzj2C66mKT/BQreiMDPU6otnCZF4PfeznchC5m3Zod2akwBIdNR4jsU2I RKTvDKnEoMjuQ+Z7LS5O4ThGQDA3gYXXjFubrstHid1yu8W3Xs254zNSXTMFYMWv48aV Aw/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ifKUnxsY1KqOYEyUDBzahqkKURBNdLLezol7uz4v+tQ=; b=NgJYUZYfipcBuaz3byf6CRvC0hkisWN2zSkXvKwDxgHJXXVZvEFjbX7VKsSSykzoR+ TnQshYdQrDkhRerOwrK14cM620FLz1ooe3eEX7tuDN4xVXgRfNfogPVHU+oEuqSImljA Lf7nvFfHEG6ALqMZGp/Lg4zlJmFSJCfFSlxoJZV1TrWhIZ1YpP74cPZVpUrNB9vbc7yV ZDdidbLswz4nWge+QGMP4/zBbW4GS0kvVTxO9C6y7eGb7N0UkQm7YS17rgBKXP71bd5U DgQ3ZEF9Pa8U/HKReEDZlm+Cdl9eUKRgElHZFARFQtEfAT2Jndk13jtp243obicACchW XAgA== X-Gm-Message-State: AOAM530A42z46RPU/hQBLap54UT92oZKUJHsEz7eiY3fNcXj1Nh5py2L hFlrkQ+DBT+OYni9yPaqVlyPFGhklSns+w== X-Google-Smtp-Source: ABdhPJwd0Jq29qcCimXCdqQgO9YkBK4M92IGv3Mrl4O68vGFvALvaF5jhR6iTnY4xYVy7Kck6boufw== X-Received: by 2002:a2e:91d9:: with SMTP id u25mr8858006ljg.79.1607444173260; Tue, 08 Dec 2020 08:16:13 -0800 (PST) Original-Received: from muffinmac ([91.206.110.206]) by smtp.gmail.com with ESMTPSA id l7sm832373lja.15.2020.12.08.08.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 08:16:12 -0800 (PST) In-Reply-To: <83o8j471m9.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Dec 2020 17:34:38 +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:195378 Archived-At: Eli Zaretskii writes: >> From: Andrii Kolomoiets >> Date: Tue, 08 Dec 2020 12:43:21 +0200 >> Cc: Ole Laursen , Lars Ingebrigtsen , >> 19031@debbugs.gnu.org >> >> 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. > > 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. Completions (including dotfiles) will be shown when user will type e.g. ".e" or when the 'icomplete-show-matches-on-no-input' variable is t. >> 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. > > But file-name input is not limited to absolute file names. The user > can legitimately enter a relative file name, in which case the > separator may not be present at all. 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