From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#51650: Autocomplete: first Tab should show *Completions* buffer Date: Sun, 07 Nov 2021 23:33:22 +0100 Message-ID: <8735o77g0d.fsf@gmx.net> References: <83bl2wa0fl.fsf@gnu.org> <838ry09xvi.fsf@gnu.org> <8335o89s48.fsf@gnu.org> <83zgqf7pvm.fsf@gnu.org> <83v9137nbx.fsf@gnu.org> <83r1br7lb3.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="12062"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) 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 23:34:15 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 1mjqjt-0002vG-Nq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Nov 2021 23:34:13 +0100 Original-Received: from [::1] (port=48914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjqjs-0001S4-GC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Nov 2021 17:34:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjqjj-0001Ri-04 for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 17:34:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjqji-00066w-O8 for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 17:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjqji-0003hd-EX for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 17:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 22:34: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.163632441514184 (code B ref 51650); Sun, 07 Nov 2021 22:34:02 +0000 Original-Received: (at 51650) by debbugs.gnu.org; 7 Nov 2021 22:33:35 +0000 Original-Received: from localhost ([127.0.0.1]:55174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjqjG-0003gg-KM for submit@debbugs.gnu.org; Sun, 07 Nov 2021 17:33:34 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:50643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjqjC-0003gR-QO for 51650@debbugs.gnu.org; Sun, 07 Nov 2021 17:33:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636324404; bh=qWDDH2h9ijvUCUfYcylJDzzdqvtlEuRvCdu+m7McjR8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=HYueE/MTehCiXvuUztY9smv36Kc/1N3yvo2GRgTgJdq3N1+K23W2t7F0wnJGuV4Zm Mp1pRVHGy2gKQ2B7PGbtJ6Hj9nErAb2Zq1tYdDQezqKcW5ddWfAwiXgdGgpRs4FUQB odMp4wJJGh2F5ujPG2ZPhrkffMTNhA35E5m5/+8Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobelfs ([188.109.162.137]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MBUqL-1msPpk3cNT-00CzZN; Sun, 07 Nov 2021 23:33:24 +0100 In-Reply-To: (Carlos Pita's message of "Sun, 7 Nov 2021 18:24:56 -0300") X-Provags-ID: V03:K1:Yj0DO0l6u01SKqnsYNA0hvC+Uq2HonpoQchGZlDLqS2q8FOU4iz uwN1DEOITUYk404Vl5rOpIWLZOP7Y6Xiv/nZnzCRpULiNSm/gzdQOqR/Ushatl4fzZ+i4gM y6K5PSQaBnvCe9/aln4p674tKT28bN/C9R3lc8VEoN3RuaBGJl4T1ajF17nMrYcntT+7Hov n4FfbjZDwotI1evY5whWw== X-UI-Out-Filterresults: notjunk:1;V03:K0:D6Oq5oZVv1Y=:fQqTUuMKWO4j93CMNX+HEp LKXl58mIQ/LgsnFdNzQ3Ge0Sm+kbODnvu60+okBVdJkzApvCql3F6C82P8Zy7Zj7Wnb0uxXEP bkPcCYpJvBJ73nMHjHRFKwAXMC2BHX+mOD44jcpRqq1WwVo/Va5cW0eqzcfyZiYDY624A/sbO bZokWBotqQ32uRz1ef6IYugrHKniL1en3JabyVbAvogJH7iRlDqLXNW5qNB8Dexsjv71iCs3s 2LZypMnCESw9v3cSEjrweK89A++W30RH5oQfosAM5aN8BxmpRPy7+couzT5iTsAkCBatvt+lq wuTsmLDqOlQ7Ob26O2HZw/ZTNyFItarL0cYgVw20hq/H+jU3UELaIEW/OKJzFmz7NA2alqnLl Cqa0Su63dJha/gU/70+uAzvmGHQgZs1GLLC0e/Mfwuo2z4cYLvK6ysGXw4K4XaUmCjA0foj0B /LA67jPapXf04GslD/enM5Zq3J5O2T4nM6QusddVDjEbFJjPiZlpdFkn2sy02ldZMhycXfkEJ dOmzeyCnkj4kvnVZB6QfpgRWEc42KME3p/7iYsY+S2SeoOHHo+XKZK1TL+6x1gT18m1FPOMAz vmKNrnz4EJRfcskv06RrNTGvNIuQZ9VNfaevtHaQw616vi9pU9fUUG0p/3nXG0jV8K9dYUo// z2i4tcLxQsqM1zzjc1RupDmzUt44lpALUEmXMZ/BilGiFDWx6eJPg6gI7BhLNe336ovqBFJTI U09VOZ5tur5/sM4nA+fNfNffSbIeGsc5ho4/Oi2u3h4FDNBhugpJ68nHLS8qPN/EzCSJHQjt 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:219297 Archived-At: On Sun, 7 Nov 2021 18:24:56 -0300 Carlos Pita wrote: > On Sun, Nov 7, 2021 at 5:39 PM Eli Zaretskii wrote: >> > >> > - The initial value is taken from the current working directory so >> > it's always a valid completion. >> >> The completion doesn't know that. It's just what the caller arranged >> for it to display. >> [...] >> The completion doesn't know where it was launched from. It just knows >> what the user typed, and in the "~/" case the user didn't type >> anything. > > If we add the context that we're doing directory completion from the > cwd my statement is true. If we remove that context I start to see > where you're coming from. Let's say the algorithm is more generic and > unaware of some facts like its initial value being valid. From its > perspective it may start with an invalid response that's not even a > prefix of a valid response. After the TAB that goes from ~/Desk to > ~/Desktop/ at least it knows that the response is the prefix of some > set of valid completions. So you may explain its behavior as: > > 1. C-x C-f => ~/ but from what I know this may be rubbish > 2. TAB => ~/ ok this is a completion but there are more with the same prefix > 3. TAB => ~/ as I said there are more with the same prefix, take a > look at the other ones > 4. Desk => ~/Desktop/ ok this is a completion > 5. TAB => ~/Desktop/ there are more with the same prefix, take a look > at the other ones > > At this level of explanation, there is a difference between the TAB in > 2 and the TAB in 5. I also get why you may be willing to say that from > 1 to 2 a completion indeed happened when, on the face of it, this > seems a nonsensical statement: the algorithm inspected a completion > set at this point and realized that the initial value is a member of > it. It's hardly what the manual conveys to a user unaware of the > implementation, but I get it. I still don't get why 2 and 3 can't be > merged into a single step but that would be a discussion about > convenience, at least I'm satisfied with this logical tackle on the > inconsistency issue. In fact, 2 and 3 essentially do get merged by setting insert-default-directory to nil: then `C-x C-f' displays no directory in the prompt, and the first TAB pops up the *Completions* buffer containing completions in the default directory (unless it's empty or contains only one file). This seems to refute the contention that the crucial difference between 2 and 5 is that in the former the user didn't type anything. Steve Berman