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#57102: 29.0.50; Peculiar file-name-split edge case Date: Mon, 15 Aug 2022 14:35:28 +0300 Message-ID: <83ilmtivsv.fsf@gnu.org> References: <87a68cwlnv.fsf@posteo.net> <87y1vtmq4d.fsf@gnus.org> <87bkspa225.fsf@posteo.net> <87lertlafe.fsf@gnus.org> <87zgg98lyc.fsf@posteo.net> <87y1vsjrkx.fsf@gnus.org> <877d3cl1ip.fsf@posteo.net> <87r11idpb9.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9213"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, 57102@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 13:42:05 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 1oNYTt-0002Hm-69 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 13:42:05 +0200 Original-Received: from localhost ([::1]:40874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNYTs-0005hk-61 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 07:42:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYO6-0003Mj-Qd for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 07:36:20 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNYO1-0008OV-U6 for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 07:36:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNYO1-0006b5-Op for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 07:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 11:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57102 X-GNU-PR-Package: emacs Original-Received: via spool by 57102-submit@debbugs.gnu.org id=B57102.166056335725348 (code B ref 57102); Mon, 15 Aug 2022 11:36:01 +0000 Original-Received: (at 57102) by debbugs.gnu.org; 15 Aug 2022 11:35:57 +0000 Original-Received: from localhost ([127.0.0.1]:41032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYNx-0006al-2x for submit@debbugs.gnu.org; Mon, 15 Aug 2022 07:35:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYNu-0006aX-C7 for 57102@debbugs.gnu.org; Mon, 15 Aug 2022 07:35:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYNl-0008Nc-Gb; Mon, 15 Aug 2022 07:35:48 -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=RlrA7+MXl6y/8adSh5RQ2MtzlBV7KtUz1upkQtTVbNo=; b=jKmgw2G9zZuc CQAVKF5XOD8Q03F7pw+kLceQ78sN4LO6Ial3JgMzmGWuG5OQqoKuPT0uJqre2RbgB8Jqwn8reDhlW +HxSw2mwDr6X8A+qdDpqhPN/QlDoRx/+gTEM7eITJKcf2359OMdPKnZ77zaK6A8t5NyZT1Jd0fXjs 8RahgVQqIqAKAS500B520mDR+1HcUWEJuesVWtjLD71QIcG1bgnyTCTZF1mE4BUOjdHOAs3qzDdW9 fY4VwekhNuC8YnNcectvyi/rwviWKlORmuVrqW2BPGGbbRjB0Gz7gdSB1eH+6o0kprqNW18opw/zl 0Zy6367s9xxrAjoZh/5ETQ==; Original-Received: from [87.69.77.57] (port=3317 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 1oNYNh-0000z2-QJ; Mon, 15 Aug 2022 07:35:45 -0400 In-Reply-To: <87r11idpb9.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 15 Aug 2022 07:54:34 +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" Xref: news.gmane.io gmane.emacs.bugs:239776 Archived-At: > Cc: 57102@debbugs.gnu.org > From: Lars Ingebrigtsen > Date: Mon, 15 Aug 2022 07:54:34 +0200 > > That is, perhaps what we want is > > (file-name-split "a/b") > => '("a" "b") > > (file-name-split "a/b/") > => '("a" "b") > > (file-name-split "/a/b") > => '("a" "b") This should return '("/" "a" "b"), or '("/a" "b") I think. > (file-name-split "//a////b////") > => '("a" "b") And this should return '("/" "a" "b" "/"), or '("/a" "b/"). > I'm not sure what > > (file-name-split "c:/a/b") > > on Windows should return in that case, though. If you agree with the above, then '("c:/" "a" "b"). If you don't care about the root directory, then '("a" "b") (a.k.a. "leave the interpretation to the caller").