From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51650: Autocomplete: first Tab should show *Completions* buffer Date: Sun, 07 Nov 2021 21:00:13 +0200 Message-ID: <83zgqf7pvm.fsf@gnu.org> References: <83bl2wa0fl.fsf@gnu.org> <838ry09xvi.fsf@gnu.org> <8335o89s48.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20226"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51650@debbugs.gnu.org To: Carlos Pita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 07 20:01:26 2021 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 1mjnPx-00055Z-VM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Nov 2021 20:01:26 +0100 Original-Received: from [::1] (port=38054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjnPw-0002Z0-6y for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Nov 2021 14:01:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjnPb-0002YM-AG for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 14:01:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjnPb-0001rY-2D for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 14:01:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjnPb-0000DI-1W for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 14:01:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 19:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51650 X-GNU-PR-Package: emacs Original-Received: via spool by 51650-submit@debbugs.gnu.org id=B51650.1636311633737 (code B ref 51650); Sun, 07 Nov 2021 19:01:02 +0000 Original-Received: (at 51650) by debbugs.gnu.org; 7 Nov 2021 19:00:33 +0000 Original-Received: from localhost ([127.0.0.1]:54803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjnP7-0000Bp-9o for submit@debbugs.gnu.org; Sun, 07 Nov 2021 14:00:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjnP4-0000BZ-Ob for 51650@debbugs.gnu.org; Sun, 07 Nov 2021 14:00:31 -0500 Original-Received: from [2001:470:142:3::e] (port=53360 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjnOz-0001lZ-Ed; Sun, 07 Nov 2021 14:00:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TDu2UMjWRgXyoDfdaX/9PtN0sauOttVuXgdLckodSUU=; b=D2YSV8J8OR1W JJcnPgyizqLfpfZGURSCF8g1kIK3kYZHwjh/9ii8U9BOi35vyZ1Ynd1dFkziwm/w6UOtd+67UNvH9 tAdgdRtk1BvZ7JTBO/XshN2dgB8mdxf7nWUoM52JWQcoXnpz71zZlApOFz3+VfIrYeGr9X6R4P/9Y tmz+z9mISl6kwWNf5fqztdy1DSJ0W/h8V5YHo3bnufyNqlckmh8mEmX5nneDH3OzI9glNgKJhitBT uY9tdWgneYDDCqdgwCjYfJ9XHRZPHiYhkobQVpu6tQandLFgKBA7y241Vy1NNGAT+gV/N/kZK8GDA Aa58OmDmgfKmOBrg+8UP0A==; Original-Received: from [87.69.77.57] (port=4940 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjnOy-00077w-WA; Sun, 07 Nov 2021 14:00:25 -0500 In-Reply-To: (message from Carlos Pita on Sun, 7 Nov 2021 15:40:22 -0300) 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:219283 Archived-At: > From: Carlos Pita > Date: Sun, 7 Nov 2021 15:40:22 -0300 > Cc: 51650@debbugs.gnu.org > > I remain unconvinced. I'll restate the above in a slightly more > precise manner, but other than that I have nothing to add and if this > is getting tiresome by all means feel free to close it. > > > > Suppose I now abort the process and do `M-x cd ~/Desktop` and then > > > enter the find-file completion again, I'm in the same situation, yet I > > > press Tab and I get "not unique" and I have to press Tab again in > > > order to get the list of candidates. Why should the behavior differ? > > > > Because you haven't typed anything yet, so Emacs doesn't know what you > > have in mind. In the other case, it has some hint. > > For me the relevant state includes: > > - I'm in the ~/Desktop directory. > - I've not yet received any information about ~/Desktop being unique or not. > > By adding one of: > > - I've reached ~/Desktop from ~/Desk by pressing Tab. > - I've reached ~/Desktop by launching Emacs from ~/Desktop. > - I've reached ~/Desktop by changing the working directory. > etc. > > ... or, more succinctly: > > - I've reached ~/Desktop by (immediately before) pressing Tab during > the same "completing session". > - I've reached ~/Desktop by other means. > > ... I can make the relevant state different, but I cannot grasp how > the added information is relevant. You say in the first case I have > typed something, namely Tab, but that was in a different context > (~/Desk) and I don't find it more relevant than the fact that I have > typed "M-x cd ~/Desktop" in the second example. What's that thing that > the user has in mind? > > If the "not unique" message were shown at the end of step 4 instead, > that would make an arguably relevant difference. In this variant, the > first Tab (both in 2 and in 4) is always the one conveying the "not > unique" hint, in 2 it's required only for this. Now in step 5 the > information set includes: "I know that ~/Desktop is not unique", while > this information is missing from the scenario in which I reached > ~/Desktop by, say, launching emacs from that directory. I still find > this inconvenient but it's a way of resolving what I see as > inconsistent. > > Another way is to make the behavior in 2 as the one in 5, that is to > require one Tab in 2 and show "not unique" and completions at > the same moment, it is the variant I prefer. > > A third, uber annoying way, is to make the behavior in 5 as the one in > 2, that is to require two Tabs in 5, so going from ~/Desk to the > completion menu for ~/Desktop would require three Tabs. We are mis-communicating. Let's start from the beginning. Scenario #1: . User presses C-x C-f TAB . Emacs says [Complete but not unique] . User presses TAB once more . Emacs pops up *Completions* and still says [Complete but not unique] Scenario #2: . User presses C-x C-f Desk TAB . Emacs completes to ~/Desktop/ . User presses TAB once more . Emacs pops up *Completions* and says [Complete but not unique] The difference after the first TAB is because in Scenario #1 there's nothing to complete, and what's in the minibuffer is already a valid response to the prompt: it specifies an existing file/directory. Whereas in Scenario #2 Emacs _can_ complete, and what the user typed is not an existing file. OK?