all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrii Kolomoiets <andreyk.mad@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: olau@iola.dk, larsi@gnus.org, 19031@debbugs.gnu.org, juri@linkov.net
Subject: bug#19031: 24.4; find-file in icomplete-mode shows completions with no input
Date: Tue, 08 Dec 2020 18:16:10 +0200	[thread overview]
Message-ID: <m2y2i8xohh.fsf@gmail.com> (raw)
In-Reply-To: <83o8j471m9.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Dec 2020 17:34:38 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrii Kolomoiets <andreyk.mad@gmail.com>
>> Date: Tue, 08 Dec 2020 12:43:21 +0200
>> Cc: Ole Laursen <olau@iola.dk>, Lars Ingebrigtsen <larsi@gnus.org>,
>>  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





  reply	other threads:[~2020-12-08 16:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 11:25 bug#19031: 24.4; find-file in icomplete-mode shows completions with no input Ole Laursen
2020-12-04 10:35 ` Lars Ingebrigtsen
2020-12-04 11:37   ` Andrii Kolomoiets
2020-12-06 12:46     ` Lars Ingebrigtsen
2020-12-07 11:43       ` Ole Laursen
2020-12-08  8:51         ` Juri Linkov
2020-12-08 10:43           ` Andrii Kolomoiets
2020-12-08 13:29             ` Lars Ingebrigtsen
2020-12-08 15:34             ` Eli Zaretskii
2020-12-08 16:16               ` Andrii Kolomoiets [this message]
2020-12-08 17:09                 ` Ole Laursen
2020-12-08 19:11                 ` Juri Linkov
2020-12-08 21:33                   ` Andrii Kolomoiets
2020-12-09 19:08                     ` Juri Linkov
2020-12-10  8:08                       ` Andrii Kolomoiets
2020-12-14  8:44                         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2y2i8xohh.fsf@gmail.com \
    --to=andreyk.mad@gmail.com \
    --cc=19031@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=olau@iola.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.