Received: (at 76032-done) by debbugs.gnu.org; 4 Feb 2025 14:32:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 04 09:32:08 2025 Received: from localhost ([127.0.0.1]:43317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tfJyC-0005T8-DN for submit <at> debbugs.gnu.org; Tue, 04 Feb 2025 09:32:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34182) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tfJy7-0005Si-1f for 76032-done <at> debbugs.gnu.org; Tue, 04 Feb 2025 09:32:05 -0500 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 <eliz@HIDDEN>) id 1tfJy1-0000sv-Ay; Tue, 04 Feb 2025 09:31:57 -0500 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=Wggd++deAL7OS8WbK0rXAVrFkyohK3wO8dpEl+uwulM=; b=TbkYh5Lq0Lod wB2EuwRSVk6zK52jkww1K3wQ+FoNtjrmP3Z5LgQ40KSuAijErm1+wX31lI6HCtsaMOQwMMyA0u8qO Ub67HiRpiVl2Bk18rBnYhP8IAaWgfNel/5wueAI9xBH5Yst985ANMC8vuM7EldSRV2U+tIrEwCXig g3V5LxKCUZt5+zBwnCEHyb5uOaPc5d7X0Z5t3vdMPqCVUgYfwqKme0FBvj7dGIYV3ANKVXrgBD3zr i+B1OkWvgHdoW4WGJn9cUw8/QWskzyoyt5koEPf0xWlxdDoVG+9L7g2I7xVFRuwHTOuC5SdHn7EIM XH19QdlX0hIGgwYNnUO0PQ==; Date: Tue, 04 Feb 2025 16:31:55 +0200 Message-Id: <86tt99aihw.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Ship Mints <shipmints@HIDDEN> In-Reply-To: <CAN+1HbqQ=MkZTOZ9ht=PANvDGvZVjBfuP5BHMyDVMM07XDRA4A@HIDDEN> (message from Ship Mints on Tue, 4 Feb 2025 05:28:33 -0500) Subject: Re: bug#76032: file-name-directory should treat "~" as the "user's root" and not return nil References: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> <87v7tqyw9t.fsf@HIDDEN> <CAN+1HbqQ=MkZTOZ9ht=PANvDGvZVjBfuP5BHMyDVMM07XDRA4A@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76032-done Cc: michael.albinus@HIDDEN, 76032-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: 76032 <at> debbugs.gnu.org > From: Ship Mints <shipmints@HIDDEN> > Date: Tue, 4 Feb 2025 05:28:33 -0500 > > ~ is the conventional equivalent of ~/, more precisely ~/. It is "equivalent" in some sense but not in others. For the same reason that "foo/" and "foo" are not necessarily equivalent in Emacs: one has the form of a directory, the other has the form of a file name. We have functions like file-name-as-directory and directory-file-name precisely because in some cases these are _not_ equivalent. > I will guard my own code, add advice or replace erroneous code that I don't control, and offer patches as I've > been doing, like to project.el. That's the right thing to do, yes. > Please close this issue. Thanks, done.
bug-gnu-emacs@HIDDEN
:bug#76032
; Package emacs
.
Full text available.Michael Albinus <michael.albinus@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Michael Albinus <michael.albinus@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 76032) by debbugs.gnu.org; 4 Feb 2025 10:30:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 04 05:30:40 2025 Received: from localhost ([127.0.0.1]:42780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tfGCW-0004Y2-GY for submit <at> debbugs.gnu.org; Tue, 04 Feb 2025 05:30:40 -0500 Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]:56334) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1tfGCT-0004Xf-Pe for 76032 <at> debbugs.gnu.org; Tue, 04 Feb 2025 05:30:38 -0500 Received: by mail-ua1-x92b.google.com with SMTP id a1e0cc1a2514c-85bad7be09dso2878138241.0 for <76032 <at> debbugs.gnu.org>; Tue, 04 Feb 2025 02:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738665032; x=1739269832; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=R5LmIIane4ADGQPHm5LbVsBic7SBnjO0A/uMUO0h43s=; b=WuYY2EbeVc07uuTQYFgkuds1KptfksFQ+b6p52ViNF2czwjbuF/oPn8gzdAtZ3Pfe6 TmnTAfNUkthhKXfRVL5QrJpjEZKlsz1eaiBsGlcobIxf0NYDe/knavKsxOyAxLaiTTQ9 FLzYyQay6BgQzuashGHMPfeyxhzfOctuaBKBPOJW2/bmJKoW3OG/LI/8MxNK3p5P5Pdc ICYouME20mGpKZLn9a1KClcXA3OmUuRPF9VGn18dpP5sKDegdcu2jEhqRlcg5HAZQlJy pjPyKq6kRXguCr1HrjlercXPj2YWM6QcX0ThPh6g1y5q0XAIDgCoACZBVFJg0GPin+ee RiNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738665032; x=1739269832; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R5LmIIane4ADGQPHm5LbVsBic7SBnjO0A/uMUO0h43s=; b=SZXpvCgIC1t5aqlmgV4TSPdMvNVJ/0+w3WeQ3v7cv1tB5rhFbB7p/WftQSNTCTRC0s TuWm5CUE5B84C6FH1i0qYexfA3rzJX/7NzYWZNr/67J5LYlPv8gtERULRjIRRtw2RVGb ET1tviDPo0BHG4sZb7b9qRQbbyk5dziNPSmjYVTXLaseXUJ+Fpb6jzMl6nAfaiGu2B4Y TUlh/NGgJ7MEL/ovL1mQTguUzUrHUlvnrNnimo6KI04KqdWmjBNLdGY48kGDupycehI4 nd6ehndWUNvHETFG6RGDaoUMIpXOBcJWcSrj52qN0qmbfVpKlRDKjIr/f3RyQgMN1dlk GddQ== X-Gm-Message-State: AOJu0YwAZc7n3PvyLdQJnO7PLuA/fdH49Ja5UuDUl3kp/GPXZLEGKOej mcQsrz5Ai/XjDnhhcAZn+S9T4uG3S2sH0qxWUN3UOmqEBxrPgNVp4nx+FZlz8fL11ldBfiKDsjS J1c+03LqW9OKYU0iQBIAUOrWM8U0= X-Gm-Gg: ASbGncstk+KNAA5aaJwBUGE9wSerXanoyDMboW7gyLNPB7Ihw2hrPccQ2dfq8tOXQb5 37RDOwXFYDRwkLSdmZbxPDfSklheJ2vFduZrV1HmgFK1GiwsNBQJp8BFI3faMCKj1NFe2QhwV X-Google-Smtp-Source: AGHT+IFY53eYesyjf1/Hx0B2ZHpH02wKNrW8xcokpJxMApKfjxscoBZtIyRH8Pswloe5cU5hlU0nv3SWS2rku8VgGL8= X-Received: by 2002:a05:6102:534b:b0:4b1:1b41:ff5f with SMTP id ada2fe7eead31-4b9a4f267famr21026384137.1.1738665031954; Tue, 04 Feb 2025 02:30:31 -0800 (PST) MIME-Version: 1.0 References: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> <87v7tqyw9t.fsf@HIDDEN> In-Reply-To: <87v7tqyw9t.fsf@HIDDEN> From: Ship Mints <shipmints@HIDDEN> Date: Tue, 4 Feb 2025 05:28:33 -0500 X-Gm-Features: AWEUYZk_BJ4zwvK14GX2uShB0Jd_NrKDnAgQ7ClD1nJldKp_A_sH0m041WX8q1E Message-ID: <CAN+1HbqQ=MkZTOZ9ht=PANvDGvZVjBfuP5BHMyDVMM07XDRA4A@HIDDEN> Subject: Re: bug#76032: file-name-directory should treat "~" as the "user's root" and not return nil To: Michael Albinus <michael.albinus@HIDDEN> Content-Type: multipart/alternative; boundary="0000000000009cf75c062d4e7f86" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76032 Cc: 76032 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --0000000000009cf75c062d4e7f86 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ~ is the conventional equivalent of ~/, more precisely ~/. though the . is elided nearly all the time, and hence not a file but a path to a directory. In any case, if this will break things as a long-standing convention, let's leave it alone. I definitely don't want to break Tramp or make maintenance even more challenging than it already is. I will guard my own code, add advice or replace erroneous code that I don't control, and offer patches as I've been doing, like to project.el. Please close this issue. -Stephane On Tue, Feb 4, 2025 at 3:00=E2=80=AFAM Michael Albinus <michael.albinus@gmx= .de> wrote: > Ship Mints <shipmints@HIDDEN> writes: > > Hi, > > > The following returns nil but I think this should return "~": > > > > (file-name-directory "~") ; nil > > > > If one considers "~" as the "user's root", it seems natural to respect > > "~" as a directory equivalent and would be in harmony with: > > "~" is clearly a file name construct to be handled by > expand-file-name. We should not allow people to write too sloppy > code. There is a reason that Emacs has several operations for file > names, "since ever". > > And remember, file-name-directoy has handlers, for example (but not > restricted to) Tramp. Not all of them in Emacs core. How do you want to > change them? > > I'm against your proposal. > > > -Stephane > > Best regards, Michael. > --0000000000009cf75c062d4e7f86 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac= e">~ is the conventional equivalent of ~/, more precisely ~/. though the . = is elided nearly all the time, and hence not a file but a path to a directo= ry.</div><div class=3D"gmail_default" style=3D"font-family:monospace"><br><= /div><div class=3D"gmail_default" style=3D"font-family:monospace">In any ca= se, if this will break things as a long-standing convention, let's leav= e it alone. I definitely don't want to break Tramp or make maintenance = even more challenging than it already=C2=A0is.</div><div class=3D"gmail_def= ault" style=3D"font-family:monospace"><br></div><div class=3D"gmail_default= " style=3D"font-family:monospace">I will guard my own code, add advice or r= eplace erroneous code that I don't control, and offer patches as I'= ve been doing, like to project.el.</div><div class=3D"gmail_default" style= =3D"font-family:monospace"><br></div><div class=3D"gmail_default" style=3D"= font-family:monospace">Please close this issue.</div><div class=3D"gmail_de= fault" style=3D"font-family:monospace"><br></div><div class=3D"gmail_defaul= t" style=3D"font-family:monospace">-Stephane</div></div><br><div class=3D"g= mail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On = Tue, Feb 4, 2025 at 3:00=E2=80=AFAM Michael Albinus <<a href=3D"mailto:m= ichael.albinus@HIDDEN">michael.albinus@HIDDEN</a>> wrote:<br></div><bloc= kquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:= 1px solid rgb(204,204,204);padding-left:1ex">Ship Mints <<a href=3D"mail= to:shipmints@HIDDEN" target=3D"_blank">shipmints@HIDDEN</a>> write= s:<br> <br> Hi,<br> <br> > The following returns nil but I think this should return "~"= :<br> ><br> > (file-name-directory "~") ; nil<br> ><br> > If one considers "~" as the "user's root", it = seems natural to respect<br> > "~" as a directory equivalent and would be in harmony with:<= br> <br> "~" is clearly a file name construct to be handled by<br> expand-file-name. We should not allow people to write too sloppy<br> code. There is a reason that Emacs has several operations for file<br> names, "since ever".<br> <br> And remember, file-name-directoy has handlers, for example (but not<br> restricted to) Tramp. Not all of them in Emacs core. How do you want to<br> change them?<br> <br> I'm against your proposal.<br> <br> > -Stephane<br> <br> Best regards, Michael.<br> </blockquote></div> --0000000000009cf75c062d4e7f86--
bug-gnu-emacs@HIDDEN
:bug#76032
; Package emacs
.
Full text available.Received: (at 76032) by debbugs.gnu.org; 4 Feb 2025 08:00:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 04 03:00:40 2025 Received: from localhost ([127.0.0.1]:42473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tfDrL-0005kh-SD for submit <at> debbugs.gnu.org; Tue, 04 Feb 2025 03:00:40 -0500 Received: from mout.gmx.net ([212.227.17.20]:48773) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <michael.albinus@HIDDEN>) id 1tfDrJ-0005kM-7F for 76032 <at> debbugs.gnu.org; Tue, 04 Feb 2025 03:00:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1738656031; x=1739260831; i=michael.albinus@HIDDEN; bh=qie8Gz9WGbcgzkmGsrjzZWBrwFtU9UO16FsXvtmSLRI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=HXfr7WNKeQSnRUl8hbh1krc46RuwSyDN6oiYW8RczUZ/xmfxrQ+lhG0y9nieRUVA scYgFOL+Nf+m9ckDCvP4ii5aHqgHTi7Mbxj5UfLMOSl/0f96CEaEWtvmwTx7w3eTy o1nYVTA6LUaHqVeo28RiQAEhCiOH+gdXymNo9kxxam3bU1kZZcwzdURL2I/0yUOy2 Zw/bDktrQWXgIJdrNIPAGo9ygW7DAdrFW+CZvEZYpFVmjfQ56oPRUR40DgZviMe7F PNpaN6Y6GTdO8ibiUsusbnGQV3Y1Iy7+MYrNmDGpiZMqKQB+wVK/atMzQzI79WXxl +hcxpiGLXrAtMK9bMQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MdNY8-1t5t6c3w2q-00mV5v; Tue, 04 Feb 2025 09:00:31 +0100 From: Michael Albinus <michael.albinus@HIDDEN> To: Ship Mints <shipmints@HIDDEN> Subject: Re: bug#76032: file-name-directory should treat "~" as the "user's root" and not return nil In-Reply-To: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> (Ship Mints's message of "Mon, 3 Feb 2025 13:10:45 -0500") References: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> Date: Tue, 04 Feb 2025 09:00:30 +0100 Message-ID: <87v7tqyw9t.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:BV+EK6RYpTSS51alzne/1tOp/OwjUkdjDacmqb0aBFLSTJC+8q1 eDZJGrViLnfbiWQt0ygaavP9YfO/K8ciWg5/4hmwIu09pnXsS3F8Ey4dXVUFNg1LdB1W4e7 rWQ+UcKZBHBAt03v5d7RsW0vFWHNA6hGWppj2c8RFmuTCoGvlIjBUckuV9lDHy0bbErMpMW z3LFxBfys6wzsYXyF95rA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:0vDePbCb+YQ=;/Lyook7SnjiBlq2F9nHWA5qIPDL SwbpYaQYDiruvDS7EWxaV5Hspr2AtB3CIqfWj5vhipOD6DBT/yOvL4gKjcgrvidVbJ8WMqvv8 uv0mIKjPhVgM3krdSm5BHy4IZ9obHiqNzjLRXcgVUu4U4g+5oQECgNKORTlndVHHaiJ9bp+fx cbLzfju6koAMEskKci/TLVTU2peYL743Vb9Iv67VijAl8Xy+aeWSjeSjq51LtjMuBqcbyjvch 5OQY+NJ6reG1uRTDvCbSkxVjwnMn32iaBbI3bEZACp8hlnsqrLROt/EDz7KZrf7ytiTe25RyA 4bw5lbtszT8mywBIre5MsJCOx0ZlXyqi/c6X2YRj6yB4G36OWe8uoQMnCqzzhS054Dy/IcbUK XKp30zvza4fAnJvc6pAtCEB2OnfRf4gjNXbtXuB/x9HpT1RQOSNn9gXC349tDegz3Q8faokgt MwNYY4lXW8CvN+AGwrhhy4siAwahBGeDCV5pxOntbC3hHg983KKr4nT+dp4YJWRT9DioorJck xAlAx4+7xTsv21/Ar3E32KcqdJU/KLcv4JDnrM7heqZC5u+PwthV4pPNaqnS8+/H7mlgUkPGQ epoVTtXHUml6yUBuzKDhoAOsJtr95xha05u7vd5rqg0acbHOwwo4oh6ugYi4TGYGCF6KWKkdQ IazvUdCW2I1+QLIVyStImstrEsV6GIQoZ1/InoJpkxdIOHSnmY0WFnOuFpAHJ9wiAzxIbddsh ezGg6h5C75oMcfmIwwsK9AwJ2RxESo6GHL4Ta1ROwAXeG6G3HRxVH945eNndp7xxUjlmVtP/G vGiKwiSzaXJLMNJfhQ8eqgfzKeHnQ4hwgP+3RBYTUIrYECuXK4Y7+uMWXlDYDMRmKVamGjrwh sZfIDqc1grbbDJiiYgFiV2R9k9CqZd4V7rRym5MH/JYkkf0MegF1ALLBa/I6uWbxMKDndEHtI LSoWR3YL11/x3/lNCXyBZGJGvbPt1GeBB/kusXfZCfwqxd9wonuex2vWzlovl6DFC0rCuZTev m/LZQeo0PWSiMJocnwMd1DVIW3p+Z0+aQBb1AwdHdDDHC2wWlumOesiY9377YjQ+sX9XKIw8f 5PY3IblBoHz9XYv9qKUcGNfD8bRwl9YkQ6WQqtCBQSiDhqs0eBx6ARGlpaTxB8EnV7MWc0oi/ 4dFJiEKzejD6A9kYNhqNUXk9wUkR+HIj9UdnqAtkHr5TvNQXJLNpA8cJyqGMYlWDwhfwrwcTw vGtEBeUzdSGvWHRkzxSp5Qr4EQ4xnYVM5H+VKSL8TPefyo5V7goSqY8Ep8IrK3ZC+jO9prTaz 0NkEyKvjETyobiSUJbt/H/+46H1JK1JePKSR738tU/lppg= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 76032 Cc: 76032 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Ship Mints <shipmints@HIDDEN> writes: Hi, > The following returns nil but I think this should return "~": > > (file-name-directory "~") ; nil > > If one considers "~" as the "user's root", it seems natural to respect > "~" as a directory equivalent and would be in harmony with: "~" is clearly a file name construct to be handled by expand-file-name. We should not allow people to write too sloppy code. There is a reason that Emacs has several operations for file names, "since ever". And remember, file-name-directoy has handlers, for example (but not restricted to) Tramp. Not all of them in Emacs core. How do you want to change them? I'm against your proposal. > -Stephane Best regards, Michael.
bug-gnu-emacs@HIDDEN
:bug#76032
; Package emacs
.
Full text available.Received: (at 76032) by debbugs.gnu.org; 3 Feb 2025 22:29:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 17:29:50 2025 Received: from localhost ([127.0.0.1]:41694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tf4ww-00044y-0q for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 17:29:50 -0500 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]:54668) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1tf4wu-00044i-5U for 76032 <at> debbugs.gnu.org; Mon, 03 Feb 2025 17:29:48 -0500 Received: by mail-ua1-x931.google.com with SMTP id a1e0cc1a2514c-8641c7574a5so1326136241.1 for <76032 <at> debbugs.gnu.org>; Mon, 03 Feb 2025 14:29:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738621782; x=1739226582; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gMdtrH70grPAzXuxU6QajRA0uJL0k9gM1p2tqfjVSJM=; b=MZG+W8yMkKVk4ef1VeRfhZIiP5vqSX4kqlb03xiMhFhc7Pr9dWQSzqYSnNA8+X0J3V kOqsemC4nqZk8/fQx29lKcHXYe9YnGva6vMhJ8XoTA22RRoVumr4H28ZHurqF7aD69u6 UP+NBnYg6gh/hfbe0KKbFQb88Xf8iNd1uVhibPWttJfP0huye/puTUju1vFUIiO6wMkh qdh5Gdkb7yDbalBtjBijwvei7Ym1FhxtqpbdXBbfx4osyO4ZNxtL2NTeRgAZ75rbDYlf aSz2YMYRcdOgutFXKCkgBCYYRsOZ9TJhE5MbjsEMiX+gepda3KrfFHxKuXr0UC6lBulQ 5XSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738621782; x=1739226582; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gMdtrH70grPAzXuxU6QajRA0uJL0k9gM1p2tqfjVSJM=; b=Dei2USAoxGNYqKjnfr9hskYhF9+xrZhs8h4epWLjgrwjEgnt0HTDH9cHagtv4gmR/z YK5jYsoaQlednC8u383P3WyRy6q/bWrPlYJXjpnELtIQfP8fA4Yp5KYdkSJmodDlvDMm 5FEHGe3qyJ3qxgEnoGDbb+VbEta602iIBCo4X6Q4qpj0PpuJQKqbj/EfibeZ5YS3khLd AVsKeYa/aXIV7/rAXoRjKJMt8Cboq0mXFBr2FStGkrj3uhJzxJQqVsCjkH3A11IT1kSz 05xIbpEkzOaR5uqsWz+JMw1MzP9rq2iO9oojzI/Lq0YwfeoE6l+OpOV8z+VUr7VHVuBC ME9g== X-Forwarded-Encrypted: i=1; AJvYcCUu0TZ9HKJiXbZwvkP/TpalS2plPFrAkn4kaYjVIW5WUq6W/x//dsfref2XRDGlAsxnCZ7BVg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxwHGm9cR9Z0xFTaznCEREM0fyCs/RFKWGMNqomU4WacKRF9Bzh Y+rWggmHgxEbusjFG1WMzdLiEOCSk8ZEg8uUUHnylt9XePdyvMDZGl1ovZ0A4wvG8RFK08MTm9b Tb9QZHuTpxH8ny0XAjwE5WBEfhb0= X-Gm-Gg: ASbGncsMchu+QSU2oLx3dB/EbhRb0Bvl/NZIdpgXEd+TFhS0Uwbgq8OGk2NDxDOkisp 7vFnz9tugJ6tEXy3rDZdmNNVMHt+uqgpUXY7nb0tqU9n3BZAUd+vqNu9Mrz3+Ge8lCOJc9rXb X-Google-Smtp-Source: AGHT+IEmMfyPFEjRm9SkO5WZx8BZSVWFkq/gOo9n6YwvcGg9V0QCaP1H6O1HswBpLQpK88NhFDMuB5DzNMFS8EVbO2w= X-Received: by 2002:a05:6102:801f:b0:4b2:4950:16fe with SMTP id ada2fe7eead31-4b9a4fa6ba6mr19073460137.14.1738621782307; Mon, 03 Feb 2025 14:29:42 -0800 (PST) MIME-Version: 1.0 References: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> <86ikpqby2w.fsf@HIDDEN> <CAN+1Hbp0pUcbBYeRt+FoKwtsODjQ+KqMnd=YBVqHHZ0GtvKEew@HIDDEN> <CADwFkmkkW1mP=MZaoS3Tv+A79wEioVF5423w5AZ0vg6n+seG5A@HIDDEN> In-Reply-To: <CADwFkmkkW1mP=MZaoS3Tv+A79wEioVF5423w5AZ0vg6n+seG5A@HIDDEN> From: Ship Mints <shipmints@HIDDEN> Date: Mon, 3 Feb 2025 17:27:44 -0500 X-Gm-Features: AWEUYZkxOx6geRrVBYr8chij0KyuazEMpXZKBCNveT1tC-9k3Vz471ghusq3JOw Message-ID: <CAN+1Hbrs8yiqfNWmLbcRSNjX9y54zhksC26dTUQGzZM6cNqqGw@HIDDEN> Subject: Re: bug#76032: file-name-directory should treat "~" as the "user's root" and not return nil To: Stefan Kangas <stefankangas@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000bbb887062d446d7e" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76032 Cc: Eli Zaretskii <eliz@HIDDEN>, 76032 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000bbb887062d446d7e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The issue boils down to what other people have in their code that we can't easily avoid. For example, code in project.el that needs help https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75983 On Mon, Feb 3, 2025 at 5:25=E2=80=AFPM Stefan Kangas <stefankangas@HIDDEN= m> wrote: > Ship Mints <shipmints@HIDDEN> writes: > > > Right. Let's consider this a feature request then. It's obvious that > it's a > > syntactical function but that doesn't prevent it from treating certain > > strings specially. Or it has to be wrapped or guarded for the "user's > root" > > case. > > How about using this instead > > (expand-file-name "~") > > ? > --000000000000bbb887062d446d7e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac= e">The issue boils down to what other people have in their code that we can= 't easily avoid. For example, code in project.el that needs help=C2=A0<= a href=3D"https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75983">https://de= bbugs.gnu.org/cgi/bugreport.cgi?bug=3D75983</a></div><div class=3D"gmail_de= fault" style=3D"font-family:monospace"><br></div></div><br><div class=3D"gm= ail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On M= on, Feb 3, 2025 at 5:25=E2=80=AFPM Stefan Kangas <<a href=3D"mailto:stef= ankangas@HIDDEN">stefankangas@HIDDEN</a>> wrote:<br></div><blockqu= ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px= solid rgb(204,204,204);padding-left:1ex">Ship Mints <<a href=3D"mailto:= shipmints@HIDDEN" target=3D"_blank">shipmints@HIDDEN</a>> writes:<= br> <br> > Right. Let's consider this a feature request then. It's obviou= s that it's a<br> > syntactical function but that doesn't prevent it from treating cer= tain<br> > strings specially. Or it has to be wrapped or guarded for the "us= er's root"<br> > case.<br> <br> How about using this instead<br> <br> =C2=A0 =C2=A0 (expand-file-name "~")<br> <br> ?<br> </blockquote></div> --000000000000bbb887062d446d7e--
bug-gnu-emacs@HIDDEN
:bug#76032
; Package emacs
.
Full text available.Received: (at 76032) by debbugs.gnu.org; 3 Feb 2025 22:25:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 17:25:47 2025 Received: from localhost ([127.0.0.1]:41689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tf4t1-0003xN-1z for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 17:25:47 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:52299) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1tf4sy-0003x4-43 for 76032 <at> debbugs.gnu.org; Mon, 03 Feb 2025 17:25:44 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5d0d32cd31aso7062078a12.0 for <76032 <at> debbugs.gnu.org>; Mon, 03 Feb 2025 14:25:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738621538; x=1739226338; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=pZhhhIB18ccYQT0xuDDtOtNtbInEWz6YKjb8YzrREX8=; b=Vn3vQfT6rLJLXyR0jRlZkpPzwpaTfXi0aSQ8wSywqe1jPaL82miWUFEfxuJXJnzyAz XTiLdKD0tajODWcRyB8VTHAMI9TRPvpA7vMpbJJ78dyF2hxEyyGMTjtlm9ehcf2ams1e LOUsshcP4lxtfcOUjwki0wjVsmYJTEOrdNGuqNz8VsPcRrSATck7G1ePQuNRfGrh8WCp Mm40MCFhropQF5sSy8rmOulpfmGD1gnQQN3A548W4Fx1NAOh5XhcJFWC9zUwDuM3E0Li Ihf03cQTXRWCJCNAFSFVvjgP+6aBAZOZn1a/FPoa0akNk7DQfFtIXMZNj9HjP9jDQZDH 9NwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738621538; x=1739226338; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pZhhhIB18ccYQT0xuDDtOtNtbInEWz6YKjb8YzrREX8=; b=NCOCgd4au4H3BKQaFif20YyE5xCYw27q+DL/AX/mY7Bya+TRD7DetsVM8h1xBEN1ju rUKBHIrP9TsNImc5w8y5g/NGVcL5e792ihu8Y6d+2hVJF2Sf20dQwC70WbW6Ol+ArxuO 5R9w7uYPn+Lz4EoN8O4TN69fyS4GEshL5w3DsKEuzBrFR6XO+eFgolI3K3fSPs9/8a5h es1wkOBe4G3BroCUWzhUqjxjGzXJCOclVMQFZFJXoHfoKRrtYDn68SjS0y7dk34FyIo1 D/Q9YiRHEuRI28ZPOSQbnA7esbOtv3fcBj0w18fXxPk15moHQZZL8+YnhevePiFF7TVK 5icg== X-Gm-Message-State: AOJu0YydxUCV3kn7ihTjnWJ0c4iNEJoclehKOk5/V0RnA/AfhSoXPAyk suCyCYBsc5ZqmoMoF7AY008RojDgn+nhbos+uoGnu7HDhtPODyJoWsJn8zfbQF1Chs0vYQvrHxP NQt7WDXpAGjRktERVxnMQd9iMYzlA1TZnV2M= X-Gm-Gg: ASbGnctWgzEnNY356Ji77hi/WqHZh7SJ46Yh3eqinoxBUUOpNDjiw8tEoB/ksuvAdJx /QwH6tCObgvt7qtVD2HB8DRFsqI2bxUsKwSMVddP9Hhn7wPFiBkSrisW3dTDXf2x0+HIddowber k= X-Google-Smtp-Source: AGHT+IFkgWy+Kze3zVBlS4eKEo6S10fqXQbaDoUhCPzMzsYTq21YLFJZYoaFVyoxbbR2k2E9wk0rq9LgbejJ9c4OTWs= X-Received: by 2002:a05:6402:524b:b0:5d9:ad1:dafc with SMTP id 4fb4d7f45d1cf-5dc5efec0c7mr58272597a12.25.1738621537563; Mon, 03 Feb 2025 14:25:37 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 3 Feb 2025 22:25:37 +0000 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <CAN+1Hbp0pUcbBYeRt+FoKwtsODjQ+KqMnd=YBVqHHZ0GtvKEew@HIDDEN> References: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> <86ikpqby2w.fsf@HIDDEN> <CAN+1Hbp0pUcbBYeRt+FoKwtsODjQ+KqMnd=YBVqHHZ0GtvKEew@HIDDEN> MIME-Version: 1.0 Date: Mon, 3 Feb 2025 22:25:37 +0000 X-Gm-Features: AWEUYZk5ird-tNWo-YuA0EgVB56ndD-KhQ2GceqZbmFQJH0vpUAfnbyL4fQ0LXo Message-ID: <CADwFkmkkW1mP=MZaoS3Tv+A79wEioVF5423w5AZ0vg6n+seG5A@HIDDEN> Subject: Re: bug#76032: file-name-directory should treat "~" as the "user's root" and not return nil To: Ship Mints <shipmints@HIDDEN>, Eli Zaretskii <eliz@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76032 Cc: 76032 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Ship Mints <shipmints@HIDDEN> writes: > Right. Let's consider this a feature request then. It's obvious that it's a > syntactical function but that doesn't prevent it from treating certain > strings specially. Or it has to be wrapped or guarded for the "user's root" > case. How about using this instead (expand-file-name "~") ?
bug-gnu-emacs@HIDDEN
:bug#76032
; Package emacs
.
Full text available.Received: (at 76032) by debbugs.gnu.org; 3 Feb 2025 20:02:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 15:02:13 2025 Received: from localhost ([127.0.0.1]:41385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tf2e5-0005Tb-G6 for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 15:02:13 -0500 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]:48369) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1tf2e3-0005TN-D7 for 76032 <at> debbugs.gnu.org; Mon, 03 Feb 2025 15:02:11 -0500 Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-467a1ee7ff2so45113271cf.0 for <76032 <at> debbugs.gnu.org>; Mon, 03 Feb 2025 12:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738612925; x=1739217725; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=05S9SSAdTR79SweNZdwh41GoT8lhPkKJCFn7hI2GyYs=; b=fgbWwlDdbxp/KsFKnAQIV8sYrv8h9zcf6TwnLflR3RqZYAIoD8UW5yjPjU85GWYYFq s7R3NE0njzXQ35ljg7IkNrODkF99l4H7ZSkK566MxQoplLewNQ+zKnlZyzW5UIytW7JO vZtVOnQ7eTX7bkT/pvJtUSPaH4umq06FDUY40c93BbKWaFmccIOdVFmWE+qEXVI9pTTy E+lJlx2YDvpN8MUcC3OniTgQzgZ+QJBOYn22sGe3vTXcH9vRNMi+StBdo04GqPqE03i0 a0N8A1dTX+h5/23tDg3zgMyBtDlb4oG8lkBeVd7Vap1yw8ZjUYvqaBln/zhaILxRlFu8 nAsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738612925; x=1739217725; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=05S9SSAdTR79SweNZdwh41GoT8lhPkKJCFn7hI2GyYs=; b=Ox8gmlkbCTgXvSiWUXBZHyo1GpsOeAyRNO+IFC2GnShiK8/RgJeBNhbsj8iqGkrApb sKidbeLxxcvvVh7m/55DE/TAK+5b6xqVw3Fwtx3EkCVJf6p0V4ZyBqWEKvxkKcBLKlol Z5ILbmLqPLMCW4ihQGNw60q7JjI99dPJotCvkjon0KI+jooFuA6ij9ZfCzI/cnx2+JCt LdaL8rtsyq9O42dkI1cp4/8OdRQXk2rDIDZjraSlXuaFhdp/VAyGQAugIWAP1zGLhcDC 1VUX25yGMa8/wbGPmRDBn5jhe4aGEnJYDe915zrn+byz+GuTVHJlblfAgWDRUvK7klpJ uI5g== X-Gm-Message-State: AOJu0Yy8WHUph5pHqWqoihRHzVsGSJlxu5Yf5TrhAOAA05MuZscW2C9v 9wGvPMV5Ck6a6v9H6PPm7YchhjJ4VHEniZ2fyPX81L33b7SSkhZFRBglL6Mqgfdwt8h+n/+1y8f hzM23Nf1qOJZcLyS42MnzHOSkTpY= X-Gm-Gg: ASbGncvV9DtSjfmXQrgfG5giXGvmvRiaq5Qi8CeLdJ+/R8g9XvouaWbUNUgXjVUYEYo Oj94IjnYlhsPIkCWGqGIwePwMevB74YejMTqC0MqJ9XGmYK+7fgx3Jryn/RRrf+aKDxYCCbIx X-Google-Smtp-Source: AGHT+IGGiPE5UHXb/+ENRX9eT3Sk8wBuU9yauPtCUEUaVF9IL3mgcp7GvnBr9KUoLZWlXbnkw5yKpfHPnwYcTxYoLyQ= X-Received: by 2002:a05:620a:4397:b0:7b1:527f:cf4f with SMTP id af79cd13be357-7bffcd8f72emr3277699985a.42.1738612925389; Mon, 03 Feb 2025 12:02:05 -0800 (PST) MIME-Version: 1.0 References: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> <86ikpqby2w.fsf@HIDDEN> In-Reply-To: <86ikpqby2w.fsf@HIDDEN> From: Ship Mints <shipmints@HIDDEN> Date: Mon, 3 Feb 2025 15:00:08 -0500 X-Gm-Features: AWEUYZnzrNOvwzl0VklXIJXUgwBgr6ETVeVNzcPMQeu4kgyVIEYTHv1fWjFwXQg Message-ID: <CAN+1Hbp0pUcbBYeRt+FoKwtsODjQ+KqMnd=YBVqHHZ0GtvKEew@HIDDEN> Subject: Re: bug#76032: file-name-directory should treat "~" as the "user's root" and not return nil To: Eli Zaretskii <eliz@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000d1e334062d425d34" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76032 Cc: 76032 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000d1e334062d425d34 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Right. Let's consider this a feature request then. It's obvious that it's a syntactical function but that doesn't prevent it from treating certain strings specially. Or it has to be wrapped or guarded for the "user's root" case. On Mon, Feb 3, 2025 at 2:57=E2=80=AFPM Eli Zaretskii <eliz@HIDDEN> wrote: > > From: Ship Mints <shipmints@HIDDEN> > > Date: Mon, 3 Feb 2025 13:10:45 -0500 > > > > The following returns nil but I think this should return "~": > > > > (file-name-directory "~") ; nil > > file-name-directory is a purely syntactical function, it knows nothing > about the special meaning of "~". It returns the "directory component > of a file name". And "~" does not have such a component. > > So I don't think it's a bug. > --000000000000d1e334062d425d34 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac= e">Right. Let's consider this a feature request then. It's obvious = that it's a syntactical function but that doesn't prevent it from t= reating certain strings specially. Or it has to be wrapped or guarded for t= he "user's root" case.</div></div><br><div class=3D"gmail_quo= te gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Feb= 3, 2025 at 2:57=E2=80=AFPM Eli Zaretskii <<a href=3D"mailto:eliz@HIDDEN= g">eliz@HIDDEN</a>> wrote:<br></div><blockquote class=3D"gmail_quote" s= tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad= ding-left:1ex">> From: Ship Mints <<a href=3D"mailto:shipmints@gmail.= com" target=3D"_blank">shipmints@HIDDEN</a>><br> > Date: Mon, 3 Feb 2025 13:10:45 -0500<br> > <br> > The following returns nil but I think this should return "~"= :<br> > <br> > (file-name-directory "~") ; nil<br> <br> file-name-directory is a purely syntactical function, it knows nothing<br> about the special meaning of "~".=C2=A0 It returns the "dire= ctory component<br> of a file name".=C2=A0 And "~" does not have such a componen= t.<br> <br> So I don't think it's a bug.<br> </blockquote></div> --000000000000d1e334062d425d34--
bug-gnu-emacs@HIDDEN
:bug#76032
; Package emacs
.
Full text available.Received: (at 76032) by debbugs.gnu.org; 3 Feb 2025 19:57:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 14:57:56 2025 Received: from localhost ([127.0.0.1]:41362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tf2Zw-0005EB-2l for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 14:57:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50616) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tf2Zu-0005Dy-1I for 76032 <at> debbugs.gnu.org; Mon, 03 Feb 2025 14:57:54 -0500 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 <eliz@HIDDEN>) id 1tf2Zn-0003Ic-Pu; Mon, 03 Feb 2025 14:57:47 -0500 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=z+lqpE72J213GgaZo1kyTRqo+t6EA5RXaB2lTtbpu+c=; b=Wu3teKt6OIHX 2/1HE0ZkVuhVs5ZQTWdKEXbLLBvWmcq9k2uGsEJOZRLIfOt0ZPm2sFQ8rFQdRSJl5SzgXbSp31e/G G+6QL/G3xmmGN3PZ8NF3A0fdmmEX/jOxK7aWKhJvo++653ZQ+dzd0mhd/kYCR/NVAJXPwL/K/HkB7 JphUpQZa/5IjnknlgGDL/cp3QBwoLbWMv7y6n1jdtdHkAbQqOt+tr2I11z6FUpASsBI3+xpT/Bj2X 38OhEzUEZWBtBPM+czzxOhD353M5O7IaN5PduhA4bEZmjuBnPCSQJic01Pmka+P45dJsPz7Ib66qw 1NDTYWxu2YAkC7vgPRMuEg==; Date: Mon, 03 Feb 2025 21:57:43 +0200 Message-Id: <86ikpqby2w.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Ship Mints <shipmints@HIDDEN> In-Reply-To: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> (message from Ship Mints on Mon, 3 Feb 2025 13:10:45 -0500) Subject: Re: bug#76032: file-name-directory should treat "~" as the "user's root" and not return nil References: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76032 Cc: 76032 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Ship Mints <shipmints@HIDDEN> > Date: Mon, 3 Feb 2025 13:10:45 -0500 > > The following returns nil but I think this should return "~": > > (file-name-directory "~") ; nil file-name-directory is a purely syntactical function, it knows nothing about the special meaning of "~". It returns the "directory component of a file name". And "~" does not have such a component. So I don't think it's a bug.
bug-gnu-emacs@HIDDEN
:bug#76032
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 3 Feb 2025 18:12:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 13:12:56 2025 Received: from localhost ([127.0.0.1]:41132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tf0wK-0005c4-5k for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 13:12:56 -0500 Received: from lists.gnu.org ([2001:470:142::17]:51060) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1tf0wG-0005bk-Nj for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 13:12:53 -0500 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 <shipmints@HIDDEN>) id 1tf0wB-0003tR-8d for bug-gnu-emacs@HIDDEN; Mon, 03 Feb 2025 13:12:47 -0500 Received: from mail-vk1-xa29.google.com ([2607:f8b0:4864:20::a29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <shipmints@HIDDEN>) id 1tf0w8-0001IS-O4 for bug-gnu-emacs@HIDDEN; Mon, 03 Feb 2025 13:12:47 -0500 Received: by mail-vk1-xa29.google.com with SMTP id 71dfb90a1353d-51e902b58c0so2593262e0c.0 for <bug-gnu-emacs@HIDDEN>; Mon, 03 Feb 2025 10:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738606363; x=1739211163; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=6N5MRGo7xpGZqMWj6EE67Eg8H/YREK3aHLvfQ+gF8Qw=; b=eEKfswg6TjkbGSAWdbNUg9m3izCCzvHwRLAYmu89Lmg0N9qSCrg5mqQmVZcZpOwEsG Sd5yqv4SAlmxZhMv/2g2DL34gDLf8UqQuyArNqQ8LUe22dift7N7HLMTJzkxmd9ARgnH dVK5W57wpWA3woTM0XTFbH1awjkjvupPmyIZavGUPaePgrSl8O+KC85ThLWy+mQD2Tt0 aEJonDzHCL4ravVlNzWn96/39AG0jXFpkT1FzCst78HlOxBaPiESM2au4IgBU324fHT1 30imyP2c5LXWst8Ng/71o/4D7WDV7X54IwIwu/RlH4tMyzhrHPI5otGol+Jy7OxezDY2 w/9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738606363; x=1739211163; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6N5MRGo7xpGZqMWj6EE67Eg8H/YREK3aHLvfQ+gF8Qw=; b=IFHw8fiX62PGRWzpBWMJ5LmMhSpzv5roMQG8P42JWOie1pOCvRx8rE+YW7lMPgz1/o lIARvVj3jT7TsZNfjQLHdPospvPEGR6VN9o7epTt2ivs8zbwf/dwTdnrW3I3Ykp7d+tV S5Wg0oOVUSt66Qx6jbUwJV+NGCsAr3mnTOsLYRF3CmpBO8z2vPj2Fw4AjsDs0PQ16Ujo w9lDFALCF9oaZ+ig0cc/gHEjwU0W2j8rvVDS80/v55GeAjk8mWisNEGkqYvOmvpWVvL6 3D22Ti5ngpiYrQBEq0FNbCmWAdpUTC2QwuiQYHjPQjyhXLlEofpvbiS2Y3L9Xc0gNEn/ KC1g== X-Gm-Message-State: AOJu0YyG2hS4F7zv2V/DcVffczxEBIg2hOI8AoQrMJVZpE+ZcAtd5UOM nV64krq9xi0siB+AFse96VaroHwwVYRC4qWUau0/ajmil6EEGGsLuohtxbPHWL25bg5mF6O2Cwq +Hqr39Wil+HEQb6QjV988ekp7MNzbIs2/ X-Gm-Gg: ASbGncsJHGk85EYnvQmIrJ13bGyB2uDwnWhbsVmxlv7XVxRWclULWD+LcOPD9wjbn9K voU+JZT5GAJ5O39vL93EtRNvKyNcFfZH9W4nGc7540NwDXb562AupAvyAdEDn90sve6KV4Ws7 X-Google-Smtp-Source: AGHT+IE6gD4WU4Re0vo5FXvf86NALckQ46yLNvDVEwN0j79S5Bq3LLlWOQ/CWmtkE4I1Fubz4nVim5SQqnxMNf3Cpjs= X-Received: by 2002:a05:6122:3212:b0:50d:6a43:d525 with SMTP id 71dfb90a1353d-51e9e30c2b7mr15007141e0c.1.1738606363073; Mon, 03 Feb 2025 10:12:43 -0800 (PST) MIME-Version: 1.0 From: Ship Mints <shipmints@HIDDEN> Date: Mon, 3 Feb 2025 13:10:45 -0500 X-Gm-Features: AWEUYZmJ5pBD2mQtc8B2lKJ9BmRrSoeSzrerv9MKBz2YBKLx3FTny7-GCXMY3ds Message-ID: <CAN+1HbpRo5LmWZtK581Dh+6=B5gBdAgk=jW4_5gixoBzN6hYrQ@HIDDEN> Subject: file-name-directory should treat "~" as the "user's root" and not return nil To: bug-gnu-emacs@HIDDEN Content-Type: multipart/alternative; boundary="000000000000ace27c062d40d66c" Received-SPF: pass client-ip=2607:f8b0:4864:20::a29; envelope-from=shipmints@HIDDEN; helo=mail-vk1-xa29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --000000000000ace27c062d40d66c Content-Type: text/plain; charset="UTF-8" The following returns nil but I think this should return "~": (file-name-directory "~") ; nil If one considers "~" as the "user's root", it seems natural to respect "~" as a directory equivalent and would be in harmony with: (file-name-directory "/") which returns "/" And also in harmony with: (file-name-directory "~/") which returns "~/" If one wants to guarantee a directory form, one does: (file-name-as-directory "~") which does return "~/" And this would allow this form to work: (file-name-as-directory (file-name-directory "~")) rather than signal and error. -Stephane --000000000000ace27c062d40d66c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac= e"><div class=3D"gmail_default">The following returns nil but I think this = should return "~":</div><div class=3D"gmail_default"><br></div><d= iv class=3D"gmail_default">(file-name-directory "~") ; nil</div><= div class=3D"gmail_default"><br></div><div class=3D"gmail_default">If one c= onsiders "~" as the "user's root", it seems natural= to respect "~" as a directory equivalent and would be in harmony= with:</div><div class=3D"gmail_default"><br></div><div class=3D"gmail_defa= ult">(file-name-directory "/") which returns "/"</div><= div class=3D"gmail_default"><div class=3D"gmail_default"><br></div><div cla= ss=3D"gmail_default">And also in harmony with:</div><div class=3D"gmail_def= ault"><br></div><div class=3D"gmail_default"><div class=3D"gmail_default">(= file-name-directory "~/") which returns "~/"</div></div= ><div class=3D"gmail_default"><br></div><div class=3D"gmail_default">If one= wants to guarantee a directory form, one does:</div><div class=3D"gmail_de= fault"><br></div><div class=3D"gmail_default">(file-name-as-directory "= ;~") which does return "~/"<br></div><div class=3D"gmail_def= ault"><br></div><div class=3D"gmail_default">And this would allow this form= to work:</div><div class=3D"gmail_default"><br></div><div class=3D"gmail_d= efault"><div class=3D"gmail_default">(file-name-as-directory (file-name-dir= ectory "~")) rather than signal and error.</div></div><div class= =3D"gmail_default"><br></div><div class=3D"gmail_default">-Stephane</div></= div></div></div> --000000000000ace27c062d40d66c--
Ship Mints <shipmints@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#76032
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.