From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#57353: [PATCH] Fix parse-colon-path with UNC directory names Date: Wed, 24 Aug 2022 15:15:02 +0100 Message-ID: References: <83bksb859u.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="11704"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57353@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 24 16:16:28 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 1oQrBD-0002se-Pw for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Aug 2022 16:16:27 +0200 Original-Received: from localhost ([::1]:43986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQrBB-0004L4-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Aug 2022 10:16:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQrAp-0004KD-6u for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 10:16:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQrAo-0002it-Pr for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 10:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQrAo-0006qz-IJ for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Aug 2022 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57353 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57353-submit@debbugs.gnu.org id=B57353.166135053626275 (code B ref 57353); Wed, 24 Aug 2022 14:16:02 +0000 Original-Received: (at 57353) by debbugs.gnu.org; 24 Aug 2022 14:15:36 +0000 Original-Received: from localhost ([127.0.0.1]:47582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQrAO-0006pj-6U for submit@debbugs.gnu.org; Wed, 24 Aug 2022 10:15:36 -0400 Original-Received: from mail-ej1-f45.google.com ([209.85.218.45]:46765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQrAM-0006pT-7G for 57353@debbugs.gnu.org; Wed, 24 Aug 2022 10:15:34 -0400 Original-Received: by mail-ej1-f45.google.com with SMTP id bj12so16765485ejb.13 for <57353@debbugs.gnu.org>; Wed, 24 Aug 2022 07:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=1BeedCnLtD9SguQZr9N5vvMzxCEaKllcyRiSnynIgD4=; b=h+PX8/FP28WHXGdOewJMGjKjBixBcUllPnbathv2L362/KjWo0CfUd593z295sUZur bOBZSPXsC5ZjBq2eaoNIKZoKGPgrehJU0TJgDc9p0YI0N1apOtXwNhHkXPN0TiQ++kDZ rPI4lKFVvRxpXsN26HJ6Uw3vQXK0fhj4q9I6dRTQ+3VVEmIs1DiyqE3kETTjKBKRcAzc WocfAhAEK0eC1GNyhuXK1BAdKbGWm4ufYD/k/aoi6XoebmpfoFuTNe5nSEIUNPsc13/S xgETxOxRenY2PsAoDBjQYKBcVpNzoVJu3r2MAmxcUGSvKagZ1176BXl7fOMfyfJqhtOM eIgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=1BeedCnLtD9SguQZr9N5vvMzxCEaKllcyRiSnynIgD4=; b=NaSOgKHyD175CzAARKr4I2Y4fIKYmk0YzNrDhvwqQly6vg6Fe+7If0GUnPsAsKG/L+ g+HVo5J9wiWHqSWl7fiqsfRqb64tTGXpeVm5LJ36gQvhIE+WR96Bv3S4bWVv+kh1kcKw AOgo57ed7oYMK2S/fRrDQob2o9yEIQqeE59UdQiESUdAaf75zk9hG1W7Dwgd+C4UTDqz Uh4elrcSj+0UnYrKvO5gmj2uIzOPDZhNeJlCwW2jLiXMHBpv33K8/+8vLk7Jg8hB2gPi FGWsEtzNFPlZnZ3I/CqrA8TDd9CvoKvOOHWD47rjd7udqlqH7gw7abNqS7umNtj7+xkY 8smQ== X-Gm-Message-State: ACgBeo2I7j7n/qZLmaRxGvT0Ym/GI2XZM3RPv5wUjuXIdSTjr8SykqFA OwPLivdUz9H6z2D5DlU3AvIq3Lc52y6BYCv2AO3L/VRIh5Y= X-Google-Smtp-Source: AA6agR6ZwZcWjprV/81qFfnxdm7tJV1ij0F/VOZehLeLRzCsY4ekvBGPoKM/4udnf65Zo8Kxexw6cSZqQdVEIdlWXck= X-Received: by 2002:a17:907:868a:b0:73d:6ec5:82bb with SMTP id qa10-20020a170907868a00b0073d6ec582bbmr3094471ejc.225.1661350528233; Wed, 24 Aug 2022 07:15:28 -0700 (PDT) In-Reply-To: <83bksb859u.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:240626 Archived-At: On Tue, 23 Aug 2022 at 14:21, Eli Zaretskii wrote: > > > From: Richard Copley > > Date: Tue, 23 Aug 2022 12:34:02 +0100 > > > > A comment in `parse-colon-path' says: > > > > ;; Previous implementation used `substitute-in-file-name' > > ;; which collapse multiple "/" in front. Do the same for > > ;; backward compatibility. > > > > However, `substitute-in-file-name' does not do that: > > > > (substitute-in-file-name "//foo/a/b") // -> "//foo/a/b" > > That is true, but: > > (substitute-in-file-name "///foo/a/b") => "//foo/a/b" > > So it does collapse multiple "/", at least sometimes. Moreover, the > above is on MS-Windows, but on GNU/Linux: > > (substitute-in-file-name "///foo/a/b") => "/foo/a/b" > > So (a) this is system-dependent, and (b) substitute-in-file-name does > collapse multiple slashes, but preserves UNCs on MS-Windows. > > Therefore, your patch needs some (minor) amendments. If the goal is to be backward-compatible with substitute-in-file-name, we should do everything that function does, which is quite involved, and involves configuration that is not available to lisp. Easier to just revert the commits. But that wasn't the goal, see #21454. Tino doesn't explain why the particular case of multiple slashes at the start of a path component is any different from the other cases of multiple slashes, which are no longer changed. I'm afraid I don't understand the point of it. I'll apply a workaround locally, and leave it up to the developers to decide what to do, if anything. Thanks.