From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60264: 29.0.60; Strange file completion candidates for shadowed file paths Date: Fri, 23 Dec 2022 09:08:37 -0500 Message-ID: References: <87ili3xikc.fsf@daniel-mendler.de> <83h6xm8udx.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12462"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Daniel Mendler , 60264@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 23 15:09:51 2022 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 1p8ikB-000353-CG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Dec 2022 15:09:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8ijc-00070p-Lz; Fri, 23 Dec 2022 09:09:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8ijO-0006zL-Nh for bug-gnu-emacs@gnu.org; Fri, 23 Dec 2022 09:09:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8ijO-00016v-Ft for bug-gnu-emacs@gnu.org; Fri, 23 Dec 2022 09:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8ijO-00052W-Be for bug-gnu-emacs@gnu.org; Fri, 23 Dec 2022 09:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Dec 2022 14:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60264 X-GNU-PR-Package: emacs Original-Received: via spool by 60264-submit@debbugs.gnu.org id=B60264.167180453019345 (code B ref 60264); Fri, 23 Dec 2022 14:09:02 +0000 Original-Received: (at 60264) by debbugs.gnu.org; 23 Dec 2022 14:08:50 +0000 Original-Received: from localhost ([127.0.0.1]:37140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8ijC-00051x-94 for submit@debbugs.gnu.org; Fri, 23 Dec 2022 09:08:50 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8ij8-00051e-UB for 60264@debbugs.gnu.org; Fri, 23 Dec 2022 09:08:47 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id F4157805D6; Fri, 23 Dec 2022 09:08:40 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4F1A58067F; Fri, 23 Dec 2022 09:08:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1671804519; bh=OtEPIz+M2F0CRbLK9G5JuiBmBYVXZgAT9TIyGH9rVBw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CPrqDgnP7EOrITVmOvsjDNjwi2e1zuqJviwe8RpDks7JQbij74Qydpzpd44Tm7OZX MedGMg39uOtx67q/YykwmyjQ0bFYfiHrxigJZNT3cOgAO896Mkg8iDAMFXyUlOT4aF opOdJyjOGS3G6Dc6MmU6j7lTisig06MYR/TJP1K1DcaQYINsKBeObd9TcQrwtb8D2V ryRnUrMvHbcodMK1Rxb5T5p6iAYgDbqysc2pZGN8IUQQFj4W4KgmHf3LahThTIbPLp cVGfZeZbUoSfEh2FTfmhbWlXogJu6mp2Q801lkx8cxjT6eXs1ccjeG7mnm+g4iKz+i H3iuIX5NertnQ== Original-Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 213F51201BF; Fri, 23 Dec 2022 09:08:39 -0500 (EST) In-Reply-To: <83h6xm8udx.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 23 Dec 2022 09:13:46 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251727 Archived-At: >> 1. Start emacs -Q >> 2. C-x C-f >> 3. Delete the entire minibuffer input >> 4. Enter /etc//s >> 5. Press ? >> >> You will see candidates like etc//sbin/. The candidates can get even >> stranger. If you enter /etc//etc//etc/s then you will get candidates >> like etc//etc//etc//sbin/. I can reproduce this bug on 27 and 29. I >> haven't tried 28, but the issue should exist there too. > > I don't think it's a bug (look at what the minibuffer shows in those > cases), perhaps just a minor aesthetic thing, but I'm adding Stefan in > case he has comments. He's right, that's a bug. *Completions* normally only shows the list of matching files in the final directory, so complete filenames. It's even more true here where the "excess" is not even really part of the file name since it'll be stripped away by `substitute-in-file-name`. E.g. if you replace "/etc//s" with "~//s" in the example, we show the correct list. Stefan