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#62732: 29.0.60; uniquify-trailing-separator-p affects any buffer whose name matches a dir in CWD Date: Tue, 11 Jul 2023 15:01:21 +0300 Message-ID: <83v8eq7j3i.fsf@gnu.org> References: <87h6tpn8d5.fsf@catern.com> <87edotn7sx.fsf@catern.com> <87edlhm6wq.fsf@catern.com> <87o7kklf9c.fsf@catern.com> <83r0pf9b7d.fsf@gnu.org> <83fs5v8tsw.fsf@gnu.org> <83edlf89qp.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@catern.com, 62732@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 11 14:03:41 2023 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 1qJC5k-0002Uq-Hq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jul 2023 14:03:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJC5W-00056O-Fd; Tue, 11 Jul 2023 08:03:26 -0400 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 1qJC4A-0004UR-E9 for bug-gnu-emacs@gnu.org; Tue, 11 Jul 2023 08:02:04 -0400 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 1qJC4A-0000AK-4z for bug-gnu-emacs@gnu.org; Tue, 11 Jul 2023 08:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qJC4A-0008W4-0F for bug-gnu-emacs@gnu.org; Tue, 11 Jul 2023 08:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jul 2023 12:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62732 X-GNU-PR-Package: emacs Original-Received: via spool by 62732-submit@debbugs.gnu.org id=B62732.168907688732664 (code B ref 62732); Tue, 11 Jul 2023 12:02:01 +0000 Original-Received: (at 62732) by debbugs.gnu.org; 11 Jul 2023 12:01:27 +0000 Original-Received: from localhost ([127.0.0.1]:49896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJC3b-0008Um-ES for submit@debbugs.gnu.org; Tue, 11 Jul 2023 08:01:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJC3R-0008US-Qi for 62732@debbugs.gnu.org; Tue, 11 Jul 2023 08:01:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJC3M-0008OB-C3; Tue, 11 Jul 2023 08:01:12 -0400 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=GqTH9xYtmGvO73TNRg6oaVtF8/GZdUlotDW1G3/5Ikg=; b=YAOKJgUWi6qv yoiZx2DgJqoU0m9v6he7ReF2HYrsKSbVEcN9Ce5mkoxFrCODzhBkX969X6nSqGsQoLvEf7p8tgpxM M2AbgZQjdpCm5imwCh2iSTOdh4tsxnOQALTRm3/Cuo7Pt9AzKjQpr3W1DcV6NaLE0cqVGj2piuWwg DhAxYIlLs5N8F/5+nHTvwWj0msPkT3kkFcu835UCyyPDy4NGYTLeA9X9NgXrQT+YyYXqR4kr5t2Sf Ivp2dQpNjgZFYHizJ1oPYFBqh3nWBArJYd9olp5QzD73QNPL2MX5x/+p01PVIJaMBuw+jGWHXMXpj OfY7d9CYS5hfPXz0RnOoLg==; Original-Received: from [87.69.77.57] (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 1qJC3I-0004OO-T6; Tue, 11 Jul 2023 08:01:12 -0400 In-Reply-To: (message from Stefan Monnier on Mon, 10 Jul 2023 22:55:23 -0400) 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:264925 Archived-At: > From: Stefan Monnier > Cc: sbaugh@catern.com, 62732@debbugs.gnu.org > Date: Mon, 10 Jul 2023 22:55:23 -0400 > > >> No, `create-file-buffer` used to throw away the trailing slash, rather > >> than make use of this information. > > [ And instead uniquify had to try and recover that information by checking > the file-system. ] > > >> Not sure why Dired bothered to remove the tailing slash when calling > >> it, maybe because a long time ago `create-file-buffer` had a bug if > >> the name had a trailing slash. > > So why the need for the change in dired.el? > > Because we do want Dired to tell `create-file-buffer` that this is > a directory and it should thus obey `uniquify-trailing-separator-p`. When will we NOT want to tell create-file-buffer that the file is a directory? Your original response, viz.: > I think the fact that the callers get to control this regardless of > whether there is a file or directory by that name is one of the best > part of this change. seemed to indicate that there are cases where we would not want create-file-buffer to know that, but I suspect that we will always want, because otherwise uniquify will not work in those cases, and Spencer will report a bug. My comments assumed that indeed we will (almost) always want to tell create-file-buffer this is a directory.