X-Loop: help-debbugs@HIDDEN Subject: bug#75983: project crash, file-name-directory "~", file-equal-p nil Resent-From: Ship Mints <shipmints@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 01 Feb 2025 00:13:02 +0000 Resent-Message-ID: <handler.75983.B.173836877320404 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 75983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 75983 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.173836877320404 (code B ref -1); Sat, 01 Feb 2025 00:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Feb 2025 00:12:53 +0000 Received: from localhost ([127.0.0.1]:55443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1te181-0005J2-50 for submit <at> debbugs.gnu.org; Fri, 31 Jan 2025 19:12:53 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47968) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1te17x-0005If-Ud for submit <at> debbugs.gnu.org; Fri, 31 Jan 2025 19:12:51 -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 1te17r-0001pG-R9 for bug-gnu-emacs@HIDDEN; Fri, 31 Jan 2025 19:12:43 -0500 Received: from mail-vk1-xa30.google.com ([2607:f8b0:4864:20::a30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <shipmints@HIDDEN>) id 1te17q-0001k0-7u for bug-gnu-emacs@HIDDEN; Fri, 31 Jan 2025 19:12:43 -0500 Received: by mail-vk1-xa30.google.com with SMTP id 71dfb90a1353d-5187cd9b8e5so821679e0c.1 for <bug-gnu-emacs@HIDDEN>; Fri, 31 Jan 2025 16:12:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738368761; x=1738973561; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=gkkh+5FZPn2iUHCpXCotAfuKYcsq94QS5bdeMcJcyHo=; b=N5WeuSF9xyerVHRQap0hUij6+VGcA2c9M6TulrrpISPLEDT/mBSu2hCvR8CXbhm4jy EskcpqaU4l0ZMKElx36gmuDuU3YyjViiESKlAxkEspSPeWmns9aRR9DnYbYVq8gruXy1 3VwrrtZs40xyWF4O6Mpxcbc+LZCwr68odBYW2GnqgpAIjLTUr7YqFkkb0fiUb/5n8Bm4 QsUIQGPBwfmuM5hdLReRn+ylr03BXjVj84BCUEQmzKAEQ4RRPzfKiz85BOaaIvZ/p/sg 5VUEc1m/S3aPywWhNGBIKme63BVe7DTuCZa3+iwEVePSjh0u1zUpJrkBdJIO0YVu1bI5 M2Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738368761; x=1738973561; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gkkh+5FZPn2iUHCpXCotAfuKYcsq94QS5bdeMcJcyHo=; b=jqMQhzrTG+SMrM2sPWsoExW9zi8EHzcFGXHEWYQAoq0ZNTvgAb0yX5DwHMSSaIRtCK T2uAV1ysTSoINhUO46HagwylQr6yhjbfHAiTwc0EwkPBBbJ/DBbDTL1por497qxN/En1 AltwNMp92WhCGnd2+Xr9hCNoPSm/VHs+y1T0M8tdd9iSnJ1OsFUpZe2QxIrtFmjz/C3C /VmElzTqSUB8/7Nkn4A6/mMKc1KZB4v9yhmLapyIzkl57heDfeHpOc11B+RrcaJL4Dz8 VcH1epAkQiiD84E2QIlxSyxtE+HBI1VcUxD7ipxI+n4qoZNPPrFsRro9gl3f+jTi00YQ IIVA== X-Gm-Message-State: AOJu0Yx6t/tfNRXxAfKZ05/EVVgANlw9LPOS/r+o0nVSz9F7cjF46Z67 Ai0qHwyds3k/0xSDSVmaxWPuryC3H7oCEgNH5VkZ9p9SI/281I2woXieIN+mecLgw1Lyy6Fs9Vr ETtaAPmS8pNUcVEFB99hn+OIhKJ1MpZZN X-Gm-Gg: ASbGncvxRUGw5SbNQh/Mg+mInqyc1a4s4klNipQ0Ha7joObedw7udX3kJ+5qruD5Up5 aByuYNRo3HmFLPuLEml/gPDOCUJ3I5kqGOd8nMLpBncRgQTDkVAOiwFPel6D8f7BIOUcdAQVz X-Google-Smtp-Source: AGHT+IHC8j2ZAIe/y13jupJszlf7QoEAiXXk+2WrBekgGREgMmRnplR8eJfU6JnPVJuaI+SlHIrl0KsbkpwADYF/xXc= X-Received: by 2002:a05:6122:6594:b0:517:167a:5cc6 with SMTP id 71dfb90a1353d-51e9e4d434amr13551470e0c.6.1738368760669; Fri, 31 Jan 2025 16:12:40 -0800 (PST) MIME-Version: 1.0 From: Ship Mints <shipmints@HIDDEN> Date: Fri, 31 Jan 2025 19:10:47 -0500 X-Gm-Features: AWEUYZni7--8ysWX40Xq3UgFXsKu3NAHAtrxs04Y0-Yi0L2tHwGmCPLMIERAQDE Message-ID: <CAN+1HbqCDKYfkRgUYEV9bfV65T81ZiDsv0MSR8BMzweRxEtcfQ@HIDDEN> Content-Type: multipart/alternative; boundary="00000000000077edfe062d098493" Received-SPF: pass client-ip=2607:f8b0:4864:20::a30; envelope-from=shipmints@HIDDEN; helo=mail-vk1-xa30.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-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 (/) --00000000000077edfe062d098493 Content-Type: text/plain; charset="UTF-8" The behaviors below can be seen on 29, 30, 31 (I don't have an earlier Emacs to test but these issues probably are long-standing). Let's discuss these as I suspect there may be historical reasons for these behaviors that I'm unaware of, or maybe these are legitimate, even if old. It's also possible that I'm misunderstanding something. Issue 1: (file-name-directory "~") ; returns nil but I think this should return "~/": (file-name-directory (abbreviate-file-name "/home/username")) ; same (file-name-directory (abbreviate-file-name "/Users/username")) ; for all us macOS users Issue 2: I think file-equal-p should accept nil and consider it unspecified as in its docstring: "If FILE1 or FILE2 does not exist, the return value is unspecified." And/or find-file-name-handler should accept nil and then return nil. (file-equal-p "~" "~") ; t (file-equal-p "~" "/home/username") ; t (file-equal-p "~" (file-name-directory "~")) ; boom ;; (wrong-type-argument stringp nil) ;; find-file-name-handler(nil file-equal-p) Issue 3: project-forget-projects-under crashes when `project-list-file' contains "/home/username", which appears in my remembered project list. (defun project--read-project-list () ... (abbreviate-file-name name) ; converts "/home/username" to "~" (defun project-forget-projects-under () ... (dolist (proj (project-known-project-roots)) (when (file-equal-p (file-name-directory proj) dir) ; <--- boom on nil I'm happy to submit patches for any or all of these including guarding project-forget-projects-under to check for nil and/or amending project--read-project-list to convert "~" to "~/" as workarounds, with each submitted against a discrete bug number. -Stephane --00000000000077edfe062d098493 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 behaviors below can be seen on 29, 30, 31 (I don't have an earli= er Emacs to test but these issues probably are long-standing). Let's di= scuss these as I suspect there may be historical reasons for these behavior= s that I'm unaware of, or maybe these are legitimate,=C2=A0even if old.= It's also possible that I'm misunderstanding something.</div><div = class=3D"gmail_default" style=3D"font-family:monospace"><br></div><div clas= s=3D"gmail_default" style=3D"font-family:monospace"><div class=3D"gmail_def= ault">Issue 1:</div><div class=3D"gmail_default"><br></div><div class=3D"gm= ail_default">(file-name-directory "~") ; returns nil but I think = this should return "~/":</div><div class=3D"gmail_default"><div c= lass=3D"gmail_default">(file-name-directory</div><div class=3D"gmail_defaul= t">=C2=A0 (abbreviate-file-name "/home/username")) ; same</div><d= iv class=3D"gmail_default"><div class=3D"gmail_default">(file-name-director= y</div><div class=3D"gmail_default">=C2=A0 (abbreviate-file-name "/Use= rs/username")) ; for all us macOS users</div><div class=3D"gmail_defau= lt"><br></div></div></div><div class=3D"gmail_default">Issue 2:</div><div c= lass=3D"gmail_default"><br></div></div><div class=3D"gmail_default" style= =3D"font-family:monospace"><div class=3D"gmail_default"><div class=3D"gmail= _default">I think file-equal-p should accept nil and consider it unspecifie= d as in its docstring: "If FILE1 or FILE2 does not exist, the return v= alue is unspecified."</div><div class=3D"gmail_default"><br></div><div= class=3D"gmail_default">And/or find-file-name-handler should accept nil an= d then return nil.</div><div class=3D"gmail_default"><br></div></div><div c= lass=3D"gmail_default">(file-equal-p "~" "~") ; t</div>= <div class=3D"gmail_default">(file-equal-p "~" "/home/userna= me") ; t</div><div class=3D"gmail_default">(file-equal-p "~"= (file-name-directory "~")) ; boom</div><div class=3D"gmail_defau= lt"><div class=3D"gmail_default">;; (wrong-type-argument stringp nil)</div>= <div class=3D"gmail_default">;; find-file-name-handler(nil file-equal-p)</d= iv><div class=3D"gmail_default"><br></div></div></div><div class=3D"gmail_d= efault" style=3D"font-family:monospace">Issue 3:</div><div class=3D"gmail_d= efault" style=3D"font-family:monospace"><br></div><div class=3D"gmail_defau= lt" style=3D"font-family:monospace">project-forget-projects-under crashes w= hen `project-list-file' contains "/home/username", which appe= ars in my remembered project list.</div><div class=3D"gmail_default" style= =3D"font-family:monospace"><br></div><div class=3D"gmail_default" style=3D"= font-family:monospace">(defun project--read-project-list ()<br></div><div c= lass=3D"gmail_default" style=3D"font-family:monospace">...</div><div class= =3D"gmail_default" style=3D"font-family:monospace">=C2=A0 =C2=A0(abbreviate= -file-name name) ; converts "/home/username" to "~"</di= v><div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><d= iv class=3D"gmail_default" style=3D"font-family:monospace">(defun project-f= orget-projects-under ()</div><div class=3D"gmail_default" style=3D"font-fam= ily:monospace">...</div><div class=3D"gmail_default" style=3D"font-family:m= onospace">=C2=A0 =C2=A0 =C2=A0 (dolist (proj (project-known-project-roots))= <br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (file-equal-p (file-name-directory pr= oj) dir) ; <--- boom on nil<br></div><div class=3D"gmail_default" style= =3D"font-family:monospace"><br></div><div class=3D"gmail_default" style=3D"= font-family:monospace">I'm happy to submit patches for any or all of th= ese including guarding project-forget-projects-under to check for nil and/o= r amending project--read-project-list to convert "~" to "~/&= quot; as workarounds, with each submitted against a discrete bug number.</d= iv><div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><= div class=3D"gmail_default" style=3D"font-family:monospace">-Stephane</div>= <div class=3D"gmail_default" style=3D"font-family:monospace"><div class=3D"= gmail_default"><br></div></div></div> --00000000000077edfe062d098493--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ship Mints <shipmints@HIDDEN> Subject: bug#75983: Acknowledgement (project crash, file-name-directory "~", file-equal-p nil) Message-ID: <handler.75983.B.173836877320404.ack <at> debbugs.gnu.org> References: <CAN+1HbqCDKYfkRgUYEV9bfV65T81ZiDsv0MSR8BMzweRxEtcfQ@HIDDEN> X-Gnu-PR-Message: ack 75983 X-Gnu-PR-Package: emacs Reply-To: 75983 <at> debbugs.gnu.org Date: Sat, 01 Feb 2025 00:13:03 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 75983 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 75983: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75983 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#75983: project crash, file-name-directory "~", file-equal-p nil Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 01 Feb 2025 08:51:02 +0000 Resent-Message-ID: <handler.75983.B75983.173839983216839 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ship Mints <shipmints@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN> Cc: 75983 <at> debbugs.gnu.org Received: via spool by 75983-submit <at> debbugs.gnu.org id=B75983.173839983216839 (code B ref 75983); Sat, 01 Feb 2025 08:51:02 +0000 Received: (at 75983) by debbugs.gnu.org; 1 Feb 2025 08:50:32 +0000 Received: from localhost ([127.0.0.1]:56215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1te9Cy-0004NW-1r for submit <at> debbugs.gnu.org; Sat, 01 Feb 2025 03:50:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48064) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1te9Cw-0004NI-2z for 75983 <at> debbugs.gnu.org; Sat, 01 Feb 2025 03:50:30 -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 1te9Cq-0004rm-Hy; Sat, 01 Feb 2025 03:50:24 -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=iJgV/Tpn0qG/5NGYwIlTmQV+TLAxg2En9ZyWGfvNKWM=; b=ovL7lE6nSMzT 6GucW64BA9FXurjCDXyuZZhOYQQk7/EZsKBj7MArRS5BF5G8XVJlAVZhi7g3Z8AitazrEXX1dBlJY j8jcFmRto2An6EAfzOMZju2u2C6zGxCSWbQzkQ3/IgLDcclbqtLNisjqijxiCaUpxQJ7osML8Fn0Y vX2UzX0I2ls+7ZAhG0FaOEPB/uDt248M9Oem0bB/RyK1rZ/pzMYY1qgjUQ+00RjdPvuBfX/pBk5BS 1xdzuSwxkukpVVxGevTzbwDj/ujyxFE9ciC7S+eC5z4LJAllsy9i4Zm8XX4TRkDMBqTvBaN28wnsW m99dvS4Jr9nwTlKD1bngZQ==; Date: Sat, 01 Feb 2025 10:50:21 +0200 Message-Id: <86wmeagib6.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <CAN+1HbqCDKYfkRgUYEV9bfV65T81ZiDsv0MSR8BMzweRxEtcfQ@HIDDEN> (message from Ship Mints on Fri, 31 Jan 2025 19:10:47 -0500) References: <CAN+1HbqCDKYfkRgUYEV9bfV65T81ZiDsv0MSR8BMzweRxEtcfQ@HIDDEN> X-Spam-Score: -2.3 (--) 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: Fri, 31 Jan 2025 19:10:47 -0500 > > The behaviors below can be seen on 29, 30, 31 (I don't have an earlier Emacs to test but these issues > probably are long-standing). Let's discuss these as I suspect there may be historical reasons for these > behaviors that I'm unaware of, or maybe these are legitimate, even if old. It's also possible that I'm > misunderstanding something. Thanks, but please don't mix separate issues in the same bug report. If you think file-name-directory has a bug (I disagree), please report a separate bug against file-name-directory. If you think file-equal-p should accept nil as its argument (I'm not sure I will agree, but maybe you will convince), please report a separate feature-request bug about that function. > Issue 3: > > project-forget-projects-under crashes when `project-list-file' contains "/home/username", which appears in > my remembered project list. It doesn't crash, it signals an error. Crashing means the entire Emacs session goes down in flames. > (defun project--read-project-list () > ... > (abbreviate-file-name name) ; converts "/home/username" to "~" > > (defun project-forget-projects-under () > ... > (dolist (proj (project-known-project-roots)) > (when (file-equal-p (file-name-directory proj) dir) ; <--- boom on nil > > I'm happy to submit patches for any or all of these including guarding project-forget-projects-under to check > for nil and/or amending project--read-project-list to convert "~" to "~/" as workarounds, with each submitted > against a discrete bug number. I think this should be solved in project.el, but let's hear what Dmitry (CC'ed) thinks.
X-Loop: help-debbugs@HIDDEN Subject: bug#75983: project error with file-name-directory "~" returning nil Resent-From: Ship Mints <shipmints@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 01 Feb 2025 11:07:02 +0000 Resent-Message-ID: <handler.75983.B75983.1738407984416 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: Dmitry Gutov <dmitry@HIDDEN>, 75983 <at> debbugs.gnu.org Received: via spool by 75983-submit <at> debbugs.gnu.org id=B75983.1738407984416 (code B ref 75983); Sat, 01 Feb 2025 11:07:02 +0000 Received: (at 75983) by debbugs.gnu.org; 1 Feb 2025 11:06:24 +0000 Received: from localhost ([127.0.0.1]:56565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1teBKS-00006d-6M for submit <at> debbugs.gnu.org; Sat, 01 Feb 2025 06:06:24 -0500 Received: from mail-vs1-xe33.google.com ([2607:f8b0:4864:20::e33]:55666) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1teBKP-00006F-Od for 75983 <at> debbugs.gnu.org; Sat, 01 Feb 2025 06:06:22 -0500 Received: by mail-vs1-xe33.google.com with SMTP id ada2fe7eead31-4afe70b41a8so866713137.3 for <75983 <at> debbugs.gnu.org>; Sat, 01 Feb 2025 03:06:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738407976; x=1739012776; 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=l53cCMzD2DHO9wVjUxADbNmPnGso0pNT6lbI7e9sXIE=; b=FtG2sTzCBB9BSbr68+6Y2DhFj6XzG+qCHixSkFycngA5ePH9nRvJF9fKLbmghynbGI TGtPofgQ3LIbOGTgVzJmA4av7mwcXsFKtf1k9lH3kJ00WK4RFBz8JhNKOkGWa/hR2XNx nO9aneETanLwjC0/mTSA45/2uj/jShlGkEbzl6wdcCbU17TQWm/Ur/4lmJcX6jWnCsel xq9xe4wgGjsGnfBMI4pUYaw/lH2MviK2TL9/qCtbNmEH92uDvnlHNAMa/HVT+/lPPsV1 en4OzgJtIc3uSfDmwV03N6RJOs45Ge1yVUsui/UJiyDiLhITllooO97hBPdk0PzQpd6V /vJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738407976; x=1739012776; 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=l53cCMzD2DHO9wVjUxADbNmPnGso0pNT6lbI7e9sXIE=; b=nblpSmO5V7IszhRvb3Wmw8XxfIjm91MAWtBV0KVz6YXyaTbb5Dzbkz74BadwrlXC8a gyX5lJBKafKe5Dy+5L497MFbpY3+pvC9oQY7Gcwlps2H+rI1bwILhMdrI3X+gpVTdalC HzekGKtIhpohYp1VY71sQ6MgSTQzQ2nX30CC6kli8G/XrdpiPKQuc5+QFV6TQsxQaQzW pSkkv0WctxWj5KnijVgd7gvBtvBXxqQ2BE2E5u09bC7CIGRQfscAKTkMktaZdfCt9mGa ZWkMeLm/IP5wrbVlx9Qabbv6w288+HO9JeFAzZ3XXGWvXH3mU07E/0Pa0Cz+1bTmeSL5 p+VQ== X-Forwarded-Encrypted: i=1; AJvYcCW8C+fGimzbA8fvTgmYXC3XiPXP7gVHcask5baHWkCaS5SMFqSfeRfZOygcmeNyZJ18XfAdwA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzqXub2yntxOs5OcH/kvib7SM+sLBLLiFmy6UYNfkGxAdoKMKtX Gg+cYLwe5CR3ZLMFQfHM5RxcgTn0vpWmopxFaYCTK2TqfS6PHmnHYhFLZTiE8TOeRQ1YJ8Im5iZ XYCDgoY4RgGYPxuHy+aNfXJwDxGI= X-Gm-Gg: ASbGncvTaUe3vaFhWyNT+mbhdCpW8jDpIgHhIXMwGBTdV4LPa+W3wyPt4N3jlAXQwMA X5bUtSoWjSdg5KZh1886FY8vDjwUqmCoGgM9MiDkRhPRWMGA7RwEZHblmAV8CV7KTrUe5zhZ7 X-Google-Smtp-Source: AGHT+IEzygrOckmWoovcR5lK4n8pQFYr5RovjxG6rtzVrsfodsLfFYpt4b6zuhVAgc2RxCAJ8+Rno5Oga6MwwYsnhkI= X-Received: by 2002:a05:6102:2ad3:b0:4af:bb06:62d with SMTP id ada2fe7eead31-4b9a4f499c9mr11419010137.11.1738407975871; Sat, 01 Feb 2025 03:06:15 -0800 (PST) MIME-Version: 1.0 References: <CAN+1HbqCDKYfkRgUYEV9bfV65T81ZiDsv0MSR8BMzweRxEtcfQ@HIDDEN> <86wmeagib6.fsf@HIDDEN> In-Reply-To: <86wmeagib6.fsf@HIDDEN> From: Ship Mints <shipmints@HIDDEN> Date: Sat, 1 Feb 2025 06:04:21 -0500 X-Gm-Features: AWEUYZnQxmuc3_Y4ivso825Td2p36P2KqQa-sSeio460xS8zeZzo_vRxYs6EFp0 Message-ID: <CAN+1HbosJmBPEKRnnG5au+EHmOStfHCUiakVe7tA60146P5BvA@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000e06ba3062d12a5b1" X-Spam-Score: 0.0 (/) 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 (-) --000000000000e06ba3062d12a5b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Separate bugs reports for sure, Eli, but I first thought it useful to discuss holistically to illustrate. Let's consider this bug report to be solely about project. Dmitry, I think the following patch to project--write-project-list might suffice to avoid this in the future: diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index f2a27ff91dd..f9b3b8891bc 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1824,7 +1824,7 @@ project--read-project-list (lambda (elem) (let ((name (car elem))) (list (if (file-remote-p name) name - (abbreviate-file-name name))))) + (file-name-as-directory (abbreviate-file-name name)))))) (condition-case nil (read (current-buffer)) (end-of-file This causes /Users/xxx to appear as /Users/xxx/ in the project file and then project--read-project-list produces ~/ rather than ~ for which file-name-directory produces nil. (defun project--read-project-list () ... (file-name-as-directory (abbreviate-file-name name)))))) Note: I did not consider the tramp/remote file cases in this analysis. On Sat, Feb 1, 2025 at 3:50=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote: > > From: Ship Mints <shipmints@HIDDEN> > > Date: Fri, 31 Jan 2025 19:10:47 -0500 > > > > The behaviors below can be seen on 29, 30, 31 (I don't have an earlier > Emacs to test but these issues > > probably are long-standing). Let's discuss these as I suspect there may > be historical reasons for these > > behaviors that I'm unaware of, or maybe these are legitimate, even if > old. It's also possible that I'm > > misunderstanding something. > > Thanks, but please don't mix separate issues in the same bug report. > If you think file-name-directory has a bug (I disagree), please report > a separate bug against file-name-directory. If you think file-equal-p > should accept nil as its argument (I'm not sure I will agree, but > maybe you will convince), please report a separate feature-request bug > about that function. > > > Issue 3: > > > > project-forget-projects-under crashes when `project-list-file' contains > "/home/username", which appears in > > my remembered project list. > > It doesn't crash, it signals an error. Crashing means the entire > Emacs session goes down in flames. > > > (defun project--read-project-list () > > ... > > (abbreviate-file-name name) ; converts "/home/username" to "~" > > > > (defun project-forget-projects-under () > > ... > > (dolist (proj (project-known-project-roots)) > > (when (file-equal-p (file-name-directory proj) dir) ; <--- boom > on nil > > > > I'm happy to submit patches for any or all of these including guarding > project-forget-projects-under to check > > for nil and/or amending project--read-project-list to convert "~" to > "~/" as workarounds, with each submitted > > against a discrete bug number. > > I think this should be solved in project.el, but let's hear what > Dmitry (CC'ed) thinks. > --000000000000e06ba3062d12a5b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:monospace">Separate bugs reports for sure, Eli, but I first though= t it useful to discuss holistically to illustrate. Let's consider this = bug report to be solely about project.</div><div class=3D"gmail_default" st= yle=3D"font-family:monospace"><br></div><div class=3D"gmail_default" style= =3D"font-family:monospace">Dmitry, I think the following patch to project--= write-project-list might suffice to avoid this in the future:</div><div cla= ss=3D"gmail_default"><font face=3D"monospace"><br></font></div><div class= =3D"gmail_default"><font face=3D"monospace">diff --git a/lisp/progmodes/pro= ject.el b/lisp/progmodes/project.el<br>index f2a27ff91dd..f9b3b8891bc 10064= 4<br>--- a/lisp/progmodes/project.el<br>+++ b/lisp/progmodes/project.el<br>= @@ -1824,7 +1824,7 @@ project--read-project-list<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda (elem)<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((name (car elem)))<br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (list (i= f (file-remote-p name) name<br>- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (abbreviate-file-name name= )))))<br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-name-as-directory (abbreviate-file-name n= ame))))))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (condi= tion-case nil<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (read (current-buffer))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 (end-of-file<br></font></div><div class=3D"gma= il_default"><font face=3D"monospace"><br></font></div><div class=3D"gmail_d= efault"><font face=3D"monospace">This causes=C2=A0/Users/xxx to appear as /= Users/xxx/ in the project file and then project--read-project-list produces= ~/ rather than ~ for which file-name-directory produces nil.</font></div><= div class=3D"gmail_default"><font face=3D"monospace"><br></font></div><font= face=3D"monospace">(defun project--read-project-list ()<br></font><div cla= ss=3D"gmail_default"><font face=3D"monospace">...</font></div><div class=3D= "gmail_default"><font face=3D"monospace">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(file-name-a= s-directory (abbreviate-file-name name))))))<br></font></div><div class=3D"= gmail_default"><font face=3D"monospace"><br></font></div><div class=3D"gmai= l_default"><font face=3D"monospace">Note: I did not consider the tramp/remo= te file cases in this analysis.</font></div></div><br><div class=3D"gmail_q= uote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, F= eb 1, 2025 at 3:50=E2=80=AFAM Eli Zaretskii <<a href=3D"mailto:eliz@gnu.= org">eliz@HIDDEN</a>> wrote:<br></div><blockquote class=3D"gmail_quote"= style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p= adding-left:1ex">> From: Ship Mints <<a href=3D"mailto:shipmints@gmai= l.com" target=3D"_blank">shipmints@HIDDEN</a>><br> > Date: Fri, 31 Jan 2025 19:10:47 -0500<br> > <br> > The behaviors below can be seen on 29, 30, 31 (I don't have an ear= lier Emacs to test but these issues<br> > probably are long-standing). Let's discuss these as I suspect ther= e may be historical reasons for these<br> > behaviors that I'm unaware of, or maybe these are legitimate, even= if old. It's also possible that I'm<br> > misunderstanding something.<br> <br> Thanks, but please don't mix separate issues in the same bug report.<br= > If you think file-name-directory has a bug (I disagree), please report<br> a separate bug against file-name-directory.=C2=A0 If you think file-equal-p= <br> should accept nil as its argument (I'm not sure I will agree, but<br> maybe you will convince), please report a separate feature-request bug<br> about that function.<br> <br> > Issue 3:<br> > <br> > project-forget-projects-under crashes when `project-list-file' con= tains "/home/username", which appears in<br> > my remembered project list.<br> <br> It doesn't crash, it signals an error.=C2=A0 Crashing means the entire<= br> Emacs session goes down in flames.<br> <br> > (defun project--read-project-list ()<br> > ...<br> >=C2=A0 =C2=A0 (abbreviate-file-name name) ; converts "/home/userna= me" to "~"<br> > <br> > (defun project-forget-projects-under ()<br> > ...<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0(dolist (proj (project-known-project-roots))= <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (file-equal-p (file-name-direct= ory proj) dir) ; <--- boom on nil<br> > <br> > I'm happy to submit patches for any or all of these including guar= ding project-forget-projects-under to check<br> > for nil and/or amending project--read-project-list to convert "~&= quot; to "~/" as workarounds, with each submitted<br> > against a discrete bug number.<br> <br> I think this should be solved in project.el, but let's hear what<br> Dmitry (CC'ed) thinks.<br> </blockquote></div></div> --000000000000e06ba3062d12a5b1--
X-Loop: help-debbugs@HIDDEN Subject: bug#75983: project error with file-name-directory "~" returning nil Resent-From: Dmitry Gutov <dmitry@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 12 Feb 2025 02:51:02 +0000 Resent-Message-ID: <handler.75983.B75983.173932861319228 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 75983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ship Mints <shipmints@HIDDEN>, Eli Zaretskii <eliz@HIDDEN> Cc: 75983 <at> debbugs.gnu.org Received: via spool by 75983-submit <at> debbugs.gnu.org id=B75983.173932861319228 (code B ref 75983); Wed, 12 Feb 2025 02:51:02 +0000 Received: (at 75983) by debbugs.gnu.org; 12 Feb 2025 02:50:13 +0000 Received: from localhost ([127.0.0.1]:59863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ti2pI-0004zu-5t for submit <at> debbugs.gnu.org; Tue, 11 Feb 2025 21:50:12 -0500 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]:46211) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1ti2p3-0004tY-29 for 75983 <at> debbugs.gnu.org; Tue, 11 Feb 2025 21:49:57 -0500 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id D567D13808BF; Tue, 11 Feb 2025 21:49:51 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Tue, 11 Feb 2025 21:49:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1739328591; x=1739414991; bh=QLxNMkWqMsNEEoD8SAMzp7cJj2Whf3is62syUrFt4r4=; b= lErwIvNBY2H55+pOxN1kEBJ3IprOhk5Tnjx42anD2ICv4d5koZLwlizC49CnX/aD GYsxRr76rwSFYCx+b5eYNpATb1742OV0iXZaXve7DwJBxNS4nY4HzfDoskyUgnQh 4V9qVo1Oh8/C9iGX6GMtu9flLxOqgOKE29GZ6awogyUEA+GXy851VDBeA6JGlmG2 MZHVYCXMMYHR0TDKEzNevrTWu7NKHH6hLNDAJ1ZChfUMWaq9wJdA/ILKtk6l180l SNn37C3tILulekbKuJY/vObINU4RNPeYWT6gPr5wb4eDADH5R+Cnoz3PnR/vxgrA u+kiONFZHQL4r9BwPrz6aQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739328591; x= 1739414991; bh=QLxNMkWqMsNEEoD8SAMzp7cJj2Whf3is62syUrFt4r4=; b=L bsfQ5jModFEe00dsklEr5dHSwRVHQly4rkrGBOy2GRjvVE9SytraTGcNag31FzBl EmDGDRDrho61jOI4ucaXwcGrkEhD0TtxqnTwe9LpzpczvaHf3fdi4Rt4jewsDZr2 uWgq9YbUSqLonl4BReX/LK+npDlOHRccoQI97MaStIvMRFn3uDCc3KeYcb9tC5Fa 8nwtGDKLAkjvMKnUq+eRib0JpWPacbO+6ZGDFsF/t+R/O9Y5dfsB7btDyv1kxROM xmpnOLaJAzGOl8l8iZIfNVZYjcD/bq8Yd8xb9sm2R2JCc/5F0sa/LKlVPNENrQ2f DsFnjyZx9ifk23O7AanZA== X-ME-Sender: <xms:TwysZ2Np1WHVMcnPtFM6vLSLbIDP0eZs01tvbxz-zPn13ONNw0LUOw> <xme:TwysZ0_txq1AtALNyAorfW7ou_kGQ_QD3zByzLIvq5NufAw2CYO6IA-xB7Av2E26p HZAkixENROpfxIz_ls> X-ME-Received: <xmr:TwysZ9RcHPVK8SXZTtuNc6vYAuP_wwZsYJGIWff65hXeByvfRKrl2JKjB4zA7ALl74s> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegvdejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddv jeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrd guvghvqeenucggtffrrghtthgvrhhnpeegleefteekgffhvdfhtdegveevveetteegteev geettdehhfdukeetheffueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthht ohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshhhihhpmhhinhhtshesgh hmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthho peejheelkeefseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: <xmx:TwysZ2tqzYgs2ZXsGq7CE942vBoOaPkS3yYAH5n4pIDRdM9xPAS1ew> <xmx:TwysZ-c1-u0MMKZ2763DzlNTymbDoztHAaus-z4bTV4mFPtHrSUGbw> <xmx:TwysZ60Z0aNiAtXnIe9Ai7M2oUv4Eu_-3sl0ngtsbUbLRsmeuIxDXg> <xmx:TwysZy_uMsHVbs3zyty5ENQq80fqmHI7NNmjJXW7Ba6hVmEvuMfHdQ> <xmx:TwysZ-4nkAu_Gw8xVQLuA2q3VlFbPNcezBh7pxwa53oy7kkoOsE0MPVc> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Feb 2025 21:49:50 -0500 (EST) Message-ID: <3de49cb1-8617-484b-a0af-82517b9e34e5@HIDDEN> Date: Wed, 12 Feb 2025 04:49:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <CAN+1HbqCDKYfkRgUYEV9bfV65T81ZiDsv0MSR8BMzweRxEtcfQ@HIDDEN> <86wmeagib6.fsf@HIDDEN> <CAN+1HbosJmBPEKRnnG5au+EHmOStfHCUiakVe7tA60146P5BvA@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <CAN+1HbosJmBPEKRnnG5au+EHmOStfHCUiakVe7tA60146P5BvA@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) 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 (-) Hi! On 01/02/2025 13:04, Ship Mints wrote: > Dmitry, I think the following patch to project--write-project-list might > suffice to avoid this in the future: > > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index f2a27ff91dd..f9b3b8891bc 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -1824,7 +1824,7 @@ project--read-project-list > (lambda (elem) > (let ((name (car elem))) > (list (if (file-remote-p name) name > - (abbreviate-file-name name))))) > + (file-name-as-directory (abbreviate-file- > name name)))))) > (condition-case nil > (read (current-buffer)) > (end-of-file Yeah, this is a decent solution, thanks. Any idea though, how an entry without a trailing "/" got into that file? Written by some older version of project.el?
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.