From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#51650: Autocomplete: first Tab should show *Completions* buffer Date: Sun, 7 Nov 2021 18:24:56 -0300 Message-ID: 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; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18960"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51650@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 07 22:26:11 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 1mjpg3-0004lF-9D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Nov 2021 22:26:11 +0100 Original-Received: from [::1] (port=57606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjpg2-0001mD-4A for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Nov 2021 16:26:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjpfu-0001lk-Ha for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 16:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjpfu-0002lh-8J for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 16:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjpfu-0008GC-5T for bug-gnu-emacs@gnu.org; Sun, 07 Nov 2021 16:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Nov 2021 21:26: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.163632031531680 (code B ref 51650); Sun, 07 Nov 2021 21:26:02 +0000 Original-Received: (at 51650) by debbugs.gnu.org; 7 Nov 2021 21:25:15 +0000 Original-Received: from localhost ([127.0.0.1]:55056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjpf9-0008Eu-3J for submit@debbugs.gnu.org; Sun, 07 Nov 2021 16:25:15 -0500 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:40689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjpf7-0008EQ-Hm for 51650@debbugs.gnu.org; Sun, 07 Nov 2021 16:25:14 -0500 Original-Received: by mail-wr1-f45.google.com with SMTP id r8so23400902wra.7 for <51650@debbugs.gnu.org>; Sun, 07 Nov 2021 13:25:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EefuAMUwvDcSwX1gP2YZqjVwhnFZ81D1CBmx8tVITq4=; b=iOBFgC6/fary1o2Q3usJcL74HEe8mY3PU2LIdtISNedloIbzUpOYI0rpimNPV/OIv/ IH60qs8dhuJVQh9FKJNjLcnzaCScSc38E+pJdYYKACs3eA1ZX+tMWR29yGeTQzy9GvWX 0yOlIaLzKGxrIpZNOJb/tF+FxPM32bE4ou250FoJ1NNXa4LNekYGUhK7tkCciJFGJCd3 /QDRftIva/yTffFj2gwC58SdOmOBIV4MtBAOw7kv2iu2u3fmgdpcwbXInZH+55PE/PEx ypMw0Oqk60cb/yt1sYWzfvbtd9QjgBmHXwf+Ea0lAzUPzadraH3tfdFPHEbxg2kxCof/ Wikg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EefuAMUwvDcSwX1gP2YZqjVwhnFZ81D1CBmx8tVITq4=; b=h7m+L1vJ2dadQaUMcf5POExF902mtgH3QqE7W8VAAGZKAiF8N1DMWb8tQc1XkAf7SJ rGPmb3j5q5L+QsK2fJhUVMv/EINRqIcoJ0jEiCYVaWqGzI2iQZ/j+gK+VxWyzkNriCEU TL9K/7zA61Vshrm1CUahwb99QQVWAn3bCsCG24putP+AzriQf5JkRFfc8aPOFHAdhHEW NLiXle1sFih89DSuENQy4N5GmKhCtvxdORM5dA/T9Ffzc9bhEJ4vbL9+UUxk/6ZpIO47 4gzIbxH8ZE9t8i7ocVWyxZn1sPWpwoA4ynqFPUJbvh5XIc4Qsn73et4qiCfBRhISj+KU zXKA== X-Gm-Message-State: AOAM532IiAlyLJlIGN1S3QJwdHRVKIj9fnfhxeWVQ72wxcOuOrlnuAlN +4I3FHwfdSAl5TreePzVsXGTIXYFIVwkgDcvjBgrH0o/bwgfrA== X-Google-Smtp-Source: ABdhPJzSXukNgpsabrNjSyuq2bS+DNm03SYsxfliEqfOahmYyAp8vRMpqPZZ1sHG3FveW8QGHjIvVdMD8L1VJO1QJeM= X-Received: by 2002:a5d:64cc:: with SMTP id f12mr46214750wri.322.1636320307651; Sun, 07 Nov 2021 13:25:07 -0800 (PST) In-Reply-To: <83r1br7lb3.fsf@gnu.org> 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:219296 Archived-At: 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.