From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Mar 2024 01:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 69517@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17094309214239 (code B ref -1); Sun, 03 Mar 2024 01:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Mar 2024 01:55:21 +0000 Received: from localhost ([127.0.0.1]:39461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgb4T-00016J-BY for submit@debbugs.gnu.org; Sat, 02 Mar 2024 20:55:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:53420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgb4P-000169-K7 for submit@debbugs.gnu.org; Sat, 02 Mar 2024 20:55:20 -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 ) id 1rgb1q-0006fr-N3 for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2024 20:52:38 -0500 Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgb1o-000466-BV for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2024 20:52:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1709430752; x=1710035552; i=jimjoe@gmx.net; bh=4QfQi6DJhgHSlFc5ZRwGSfBge4ooB8GOg9kUIn47qk0=; h=X-UI-Sender-Class:From:To:Subject:Date; b=XpRCNWfnwpVm+UOwcgi5ucvMVkVKvmGAXhtkZv9reeS0hQBDyuFEXsEGa6pxNpFB G0vqjM3lqnAlrmi4AN0S13u7Whe572GvMurECBqx5+k8ugB7vZmlNYcfgHUQ0D8Nw wALaLY1qZP1wUp8dfWf6Ig5YqsmF1oKp71lA9zRnVj0KSC6u6BftpQQxKMsKfwiRP YjSK++8STdFmOUn/Al3W1x4HNGNv+tBOj+6Eta2tCnYO2a2/9grZ8kjvMqCx2nmm0 qx88gHbJruHDm1W9e7eQuBSq92A+cxBcttF5MpFuAxEbqxR+4rTpnidkvUrnogdhx BWxxMxQ23NV+CmHNGw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from user-Inspiron-15-5518 ([117.216.28.216]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N4z6q-1qhvIp1xOm-010sxn for ; Sun, 03 Mar 2024 02:52:32 +0100 From: James Thomas Date: Sun, 03 Mar 2024 07:22:29 +0530 Message-ID: <87wmqkcc9u.fsf@outlook.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:Osg1nzyGPB4kLGJ6wirOTUoynJPZ4A/bCqChgDcrJOjnlzLCHZY B5KMDJpZkwyTCjhEqwE6e7440oh4FwuhFQ7FxN6qGY9JegJ4zcrGxc48gOkqmIFdWE1vhhy JpJqW6hAr26bzYmt7RkFc5bdx0E3eVIpKEjhRpCqU7bdxlKxXh1eK7AsDBPvRFkBFJsvAKn HtlrAIJPe7IHj6JMYEb4A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:zDbFYntSF/A=;m+RDA4OQLb+3r7NFptNSAqP9OzH VhqFOgdCH8rKdRVq+S+k76tTA6grX9ruNd9/jQbEJzzzCUc+FttPuAdzAF/nnmSqvfVdRFZLg DS+9CkbwktUv6H/O3juYtdbXicj1diupTlkDkAb4M0jLQFx5kV694500rM0UWxEZ+jiFArzWg +d6gNO8aeFoWTou8e+Zft09TCY7W/nZP/Rw3La1VBqQeZGvmFjfC0Necac9UDXIKZwOZ6gWEm vRJCxyRfBHqCiO85f77ewZYdfzG4EvZBrbwfqAk58ODVr+puHj8zD3LPTJbCJIqNhp9Bj7/EY gq4nCnTt0F8Vm9FDk5hl/v5Z0A2kpIfE552mP+ZMj7XzWMsBCv59fe77lBNxMSKya9uBujrQZ cCd6g/OGnxguwTSS+gxpBoyF7/SjXJ7M3eVxQyawPAPEN0UAIcssEQjApKoDJFxL02rKtkOly AjcnJu/6Rs5EEaWv4Po+NfwZewYIDmfoFiY5v79cj3uLkCmeAxdcfjzSzyCDnggbhvAr/hQ+5 Vf9Ke6jQF11PaAbudgseX1t0ho90LD5YCTEPWyd89lSfMGM42E8aH44p19lGk415xm+WDjrta 9/WMmHXsETHWUHB1sAaYEHOq27ue5hogaKArgELMsaA9sOesEP+iGH08cadBZwbgvR0aycYnI leKD2q2ni1JODmQxFu+FQsWqvV8OzHih4LfUuJaaEqOVkTPYaW/7bREAHCz3/mcOhG8s/43jw fi+2GIN8cos5astxSuK+0IKqhDZN1KupKfySfl3PJ+2PQuvuqfA1OwCoh4RjAHcGmelG8AXGJ qbzghrcVx8FWjvmu5T/cQH+Lkjnsyl7L1km55Eo0kTKiQ= Received-SPF: pass client-ip=212.227.17.22; envelope-from=jimjoe@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Reproduction steps: - Setup Gnus with any group name having a slash ('/') such as "[Gmail]/Drafts" or an Atom feed (they usually have slashes) using the patch in bug#66188. - Press '*' on a message in the group. - Do (info "(gnus) Creating a Virtual Server") - Open the above from the Server buffer; RET on the new group fails. A patch is attached. I couldn't find the problematic commit or its original branch (where it was a consolidated merge from) but 'gnus-use-long-file-names' is apparently not meant for backends: it can't even be customized with that 'not-cache' option. I think this is the right way to solve it: the other lines removed in this patch are even older, but they were never being called due to the above reason. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-02-20 built on user-Inspiron-15-5518 Repository revision: 466800591c2bd674b0b967205147d7519da7e1a4 Repository branch: nnatom-master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Ubuntu 22.04.3 LTS --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Make-gnus-cache-work-with-group-names-having.patch Content-Transfer-Encoding: quoted-printable =46rom e0b4a71bf241d6faaa46bea58a4688f1e9c932b8 Mon Sep 17 00:00:00 2001 From: James Thomas Date: Sun, 3 Mar 2024 06:58:49 +0530 Subject: [PATCH] Make gnus cache work with group names having '/' Replace the incorrect `gnus-use-long-file-name` with `nnmail-use-long-file-names`. * lisp/gnus/gnus-cache.el (gnus-cache-file-name): =2D-- lisp/gnus/gnus-cache.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 961219eee8f..d174ee9a9f4 100644 =2D-- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -448,16 +448,12 @@ gnus-cache-file-name (file-name-as-directory (expand-file-name (nnheader-translate-file-chars - (if (gnus-use-long-file-name 'not-cache) - group - (let ((group (nnheader-replace-duplicate-chars-in-string - (nnheader-replace-chars-in-string group ?/ ?_) - ?. ?_))) - ;; Translate the first colon into a slash. - (when (string-match ":" group) - (setq group (concat (substring group 0 (match-beginning 0)) - "/" (substring group (match-end 0))))) - (nnheader-replace-chars-in-string group ?. ?/))) + (let ((group (nnheader-replace-duplicate-chars-in-string + (nnheader-replace-chars-in-string group ?/ ?_) + ?. ?_))) + (if (not nnmail-use-long-file-names) + (nnheader-replace-chars-in-string group ?. ?/) + group)) t) gnus-cache-directory)))) =2D- 2.34.1 --=-=-= Content-Type: text/plain -- --=-=-=-- From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2024 08:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: James Thomas , Eric Abrahamsen Cc: 69517@debbugs.gnu.org Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.170997380712588 (code B ref 69517); Sat, 09 Mar 2024 08:44:01 +0000 Received: (at 69517) by debbugs.gnu.org; 9 Mar 2024 08:43:27 +0000 Received: from localhost ([127.0.0.1]:60539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1risIh-0003Gy-4Z for submit@debbugs.gnu.org; Sat, 09 Mar 2024 03:43:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1risIf-0003Gl-VQ for 69517@debbugs.gnu.org; Sat, 09 Mar 2024 03:43:26 -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 ) id 1risI3-0007GM-SK; Sat, 09 Mar 2024 03:42: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=1SnzetTC5AmOvKK48O7PZuYtk1wv1gXESqdLAugOUDU=; b=o++7UfpNed1J muIuqhVwyLPq3JZe4+4Kfg9+chYEutUjRNCq4tmswKtDL4BBKT2vQUCyqNmEnfc5lNjG84I1kcEID H65XDlgXdw6g7Ld4BIxkQenL1Se72zWac+wy2bmBCzOyErmsI+OQ9n5GNbhz3pgu4Z9zgosWxvjBM OD1gTRARWmcSLE4EKvh957k2walcfGGzR/EsMHNG10huiciG+vy7zPpMGfDfcwMIl4lMe0ZO4ZvcO sSTacuz2hXmKGPdpni8kQRUS7vDNemXgYmuX8YjeCK3S22CDeioOnVlraOrIltDk1qJMVKR3GZ2b7 bbF6N6hD1kPwUm5XgzZSjQ==; Date: Sat, 09 Mar 2024 10:42:43 +0200 Message-Id: <86wmqbyews.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87wmqkcc9u.fsf@outlook.com> (bug-gnu-emacs@gnu.org) References: <87wmqkcc9u.fsf@outlook.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 03 Mar 2024 07:22:29 +0530 > From: James Thomas via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Tags: patch > > Reproduction steps: > > - Setup Gnus with any group name having a slash ('/') such as > "[Gmail]/Drafts" or an Atom feed (they usually have slashes) using the > patch in bug#66188. > > - Press '*' on a message in the group. > > - Do (info "(gnus) Creating a Virtual Server") > > - Open the above from the Server buffer; RET on the new group fails. > > A patch is attached. I couldn't find the problematic commit or its > original branch (where it was a consolidated merge from) but > 'gnus-use-long-file-names' is apparently not meant for backends: it > can't even be customized with that 'not-cache' option. I think this is > the right way to solve it: the other lines removed in this patch are > even older, but they were never being called due to the above reason. Eric, could you please review the patch and install if it's okay? Thanks. From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2024 21:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 69517@debbugs.gnu.org Cc: Eric Abrahamsen , Eli Zaretskii Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.171002144012622 (code B ref 69517); Sat, 09 Mar 2024 21:58:01 +0000 Received: (at 69517) by debbugs.gnu.org; 9 Mar 2024 21:57:20 +0000 Received: from localhost ([127.0.0.1]:34947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj4gy-0003HW-FN for submit@debbugs.gnu.org; Sat, 09 Mar 2024 16:57:20 -0500 Received: from mout.gmx.net ([212.227.17.22]:39475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj4gv-0003HF-NS for 69517@debbugs.gnu.org; Sat, 09 Mar 2024 16:57:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1710021389; x=1710626189; i=jimjoe@gmx.net; bh=5onD56uCxJcIVG14wSqQihvTv9AXZc53oCwZgrfaYEo=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=fCgtgVG7iRFp3Dzosy/MJfsXdp4kCs5NIMxjQYPk47Ek9XZ9D9V/v2zT8G4oZ9ys RIM8HEdd6QB1TvkDfXvm9uVk1EqVwViiOTCS8f0/xo/y60toPfprEgKhBgnFB5vuq 5Nn1pQJhLEyoiJY3/02ll9NmF51EKbCyeSgBy5tcfOaQ05b0RcmAKv6vEtwR39w22 H6515HVsov2Wsyjx/51AkBFUU6XRaXnveVkRWFgZ/7i9hzFgwGty706pZiF+jz2e/ NFiFF69nJvNqmb6++HJsAYbiMyqrEUClOE+3oTnWRvCVZDtBbUoc6sXqAYrGh6lfZ 3RxkW0fUvWKkIpP7Ww== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from user-Inspiron-15-5518 ([59.92.164.184]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MC30P-1rXHNZ1A0D-00CQUZ; Sat, 09 Mar 2024 22:56:28 +0100 From: James Thomas In-Reply-To: <86wmqbyews.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Mar 2024 10:42:43 +0200") References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> Date: Sun, 10 Mar 2024 03:26:23 +0530 Message-ID: <8734szul14.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:dyPAgAfCOce2RHaGbVu/WgcYWOrTW9V/lCVoss2vup91amXm5XA 4X0yrxu5fPBD3d7HIrMZsjv1VK1M89ep8UnFvoRFqmSc4Cx4TnCJ9MlyiT27+XuDXcoERsa shLAADBaG9sA1xMN0dzeZInsZ+Jrw+g28qBP3QRBaukgnuWwiFYAyEZ/NYFSneFfck8j5Qz 5ZDGh4fCJxCfDItEPsRRQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:wzX849gNvbY=;UZgu2rsoxzVZLKW+9Q4pwccL9Rz sGX3BQ2fV+1kUQGQNPPZlqO99hA8chncXbesuUCvQ/fAlx1MsyQ5RDSPVmAbcUrK670PRzdSI hbwJm+w6u2wWdfLzqA8B4jqaMiDiDk8SE4QaM3CLcK0AhLfxnVlCt1sOCuioMnYMbPXMxmHSg YmjaOLXb3gjR9nZ6Nswjh6sMx3pCIbnUtmkvHEpVs6YJDpzMpX3y76Vr3FMF2hHy/MEaM9zO+ XsVY+OcvZafd/K9HdnmguOyFzzjv6pIOfA1YEnXYWaNaX3HLSIR55qSE32+7sX5uHf0DBi3Pb ewZHPl2e/Ry0Y50yU2M0oY/bDl0J+FwhpEX/l+MrCrqrTy9Lg8ECBJmgY2yQg1SyVPF+GFoxk sETGzG60Trbr6tiYUbNFy56qUCmCmyTLQhYNd2NnjPrU9i4A2MWkg+5OA99r1ubA/4L3WNx1w aQYHF7syKDWgrQwdTpYLLMrrmcyeWr1LX3ere8ScEnOjyqVEAMPoUnRosOIR4lcB7mfjmvCld upWwql3wKEuLkd+dfdx2GY5EXynq4DK9qaHtWJ6EchZz7Pcjq0a1/1mFHKCoOYAxH6Nd13BpO 8VKXjGKiblK5m6QXRiLB+mh7tQAewNoJvHd5CseEQjKYQa/8/VOxAdzBXd8T48qhs6GIbrJVZ Hg+S5HjdYZMsevQav5YR9gYWybRMYK+J2AGVyRMeIzWkulWoibG0k6Mdmv7VWCO6ImRhDfNc7 gL46UMLHt2R50U6hohpVGCXaLGgozn98IC8r/z3Vx1hJt0BncC3xV7ZDEVjTXLWNfV5HFniSV /3Yt6MC4q6uCRaePjiXsijF6xCwwappZ8gWmanHuphIOg= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii wrote: >> Date: Sun, 03 Mar 2024 07:22:29 +0530 >> From: James Thomas via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> Tags: patch >> >> Reproduction steps: >> >> - Setup Gnus with any group name having a slash ('/') such as >> "[Gmail]/Drafts" or an Atom feed (they usually have slashes) using th= e >> patch in bug#66188. >> >> - Press '*' on a message in the group. >> >> - Do (info "(gnus) Creating a Virtual Server") >> >> - Open the above from the Server buffer; RET on the new group fails. >> >> A patch is attached. I couldn't find the problematic commit or its >> original branch (where it was a consolidated merge from) but >> 'gnus-use-long-file-names' is apparently not meant for backends: it >> can't even be customized with that 'not-cache' option. I think this is >> the right way to solve it: the other lines removed in this patch are >> even older, but they were never being called due to the above reason. > > Eric, could you please review the patch and install if it's okay? > > Thanks. There's a small caveat after applying this: Before this patch, cache entries would've effectively ignored 'nnmail-use-long-file-names' (nil by default) and used long names. After this patch new entries would honor it, resulting in an extra directory tree for the same group. But only the original one would be opened (due to [[./lisp/gnus/nnmail.el::;; If this direc]]). To fix it, one would have to copy all the files in from the original directory into the new one (and retain the active file entry). Or of course, change the above variable (but that could have other implications depending upon one's configuration). =2D- From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 05:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: James Thomas Cc: Eli Zaretskii , 69517@debbugs.gnu.org Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.17100484892748 (code B ref 69517); Sun, 10 Mar 2024 05:29:01 +0000 Received: (at 69517) by debbugs.gnu.org; 10 Mar 2024 05:28:09 +0000 Received: from localhost ([127.0.0.1]:35240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjBjE-0000iF-RU for submit@debbugs.gnu.org; Sun, 10 Mar 2024 00:28:09 -0500 Received: from mail.ericabrahamsen.net ([52.70.2.18]:52528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjBjA-0000hi-Uj for 69517@debbugs.gnu.org; Sun, 10 Mar 2024 00:28:06 -0500 Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 6CE4AFA183; Sun, 10 Mar 2024 05:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1710048444; bh=v570m11nM7Kx4Qjsf9EzRWnYFN0rkK1EN99ZT2eeRFo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=AZDgjT3q+hLbzo7MXzANgrOz/puPvBOoMmPAK2h1mUhLPHcvu5GK54cwHTy471S09 tCLIF9ku9I7YpH3bYHoy7O9wZV3o9d8eyLJ3zSfY7G3nyhsCYvjvDWl0luqRxOJBeO 68gIeH3G0F+G/EW8pYchrCVhYDfGK8ZvQ0dqeQoo= From: Eric Abrahamsen In-Reply-To: <8734szul14.fsf@gmx.net> (James Thomas's message of "Sun, 10 Mar 2024 03:26:23 +0530") References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> Date: Sat, 09 Mar 2024 21:27:23 -0800 Message-ID: <874jde7j2c.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) James Thomas writes: > Eli Zaretskii wrote: > >>> Date: Sun, 03 Mar 2024 07:22:29 +0530 >>> From: James Thomas via "Bug reports for GNU Emacs, >>> the Swiss army knife of text editors" >>> >>> Tags: patch >>> >>> Reproduction steps: >>> >>> - Setup Gnus with any group name having a slash ('/') such as >>> "[Gmail]/Drafts" or an Atom feed (they usually have slashes) using the >>> patch in bug#66188. >>> >>> - Press '*' on a message in the group. >>> >>> - Do (info "(gnus) Creating a Virtual Server") >>> >>> - Open the above from the Server buffer; RET on the new group fails. >>> >>> A patch is attached. I couldn't find the problematic commit or its >>> original branch (where it was a consolidated merge from) but >>> 'gnus-use-long-file-names' is apparently not meant for backends: it >>> can't even be customized with that 'not-cache' option. I think this is >>> the right way to solve it: the other lines removed in this patch are >>> even older, but they were never being called due to the above reason. >> >> Eric, could you please review the patch and install if it's okay? >> >> Thanks. > > There's a small caveat after applying this: > > Before this patch, cache entries would've effectively ignored > 'nnmail-use-long-file-names' (nil by default) and used long names. After > this patch new entries would honor it, resulting in an extra directory > tree for the same group. But only the original one would be opened (due > to [[./lisp/gnus/nnmail.el::;; If this direc]]). To fix it, one would > have to copy all the files in from the original directory into the new > one (and retain the active file entry). Or of course, change the above > variable (but that could have other implications depending upon one's > configuration). Thanks for reporting this! Obviously something is wrong here, but I get different results from your reproduction recipe (I'm running master): when I create the cache nnml server and hit RET on it, I get: K 1: nnml:left.right K 1: nnml:left/right I am able to subscribe to both groups. When I return to the *Group* buffer, I can enter the version of the group with the ".", and read the cached article, while attempting to enter the version with the slash gives me "Invalid group (no such directory)". On disk, the "News/cache/active" file starts out with the version with the ".", and after I create the extra cache server it contains both, it looks like: "nnml:left.right" 1 1 y "nnml:left/right" 1 1 y Meanwhile, the directory structure "News/cache/nnml:left/right/1" is created. The "." in the active file comes from `gnus-cache-generate-active`, and that mechanism seems to be working fine, at least in my case -- do you not see that version of the group? To be honest I have no idea what's happening in `gnus-cache-file-name'. I'd be hesitant to remove all that code without understanding it better And I don't think we can argue that that code is "dead" just because it is behind an option value that isn't one of the customization options. Anyway, it would be good to first know why you're not seeing the "." version of the offending filename, and then I guess try to work out what's going on with the file names. It kind of looks like a collision between two different mechanisms -- one that translates "/" to "_" to prevent unwanted filesystem hierarchies, and one that translates between "/" and "." in order to convert newsgroup-name dot hierarchies into filesystem hierarchies. In this case, it seems like "long names" and newsgroup hierarchies shouldn't be applicable at all. Eric From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 18:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: James Thomas Cc: Eli Zaretskii , 69517@debbugs.gnu.org Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.17100956364780 (code B ref 69517); Sun, 10 Mar 2024 18:34:01 +0000 Received: (at 69517) by debbugs.gnu.org; 10 Mar 2024 18:33:56 +0000 Received: from localhost ([127.0.0.1]:37871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjNzf-0001Ez-Cu for submit@debbugs.gnu.org; Sun, 10 Mar 2024 14:33:56 -0400 Received: from mail.ericabrahamsen.net ([52.70.2.18]:42632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjNze-0001Ek-3y for 69517@debbugs.gnu.org; Sun, 10 Mar 2024 14:33:54 -0400 Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 21F04FA059; Sun, 10 Mar 2024 18:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1710095593; bh=QrWBx0cXP35sHhLTvJO6f/a13Oh0bIaMyAMzSpXCWUE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=fYbsNVEOX9auHYqctzEXqAEswS/huOoSQmBUaCdAAYQrn3HqmBAuNz16r7CIOVkQL 8b9JOpCbu++InKOFLyHfA7ggXaOqJ/N+B1kA5En7Os5UovZwLHoikKfHn9gX3WDJ9g TWrGhRVUhX5Hd/WhTw8ezWCAtNB1ORO2e9L4r3uM= From: Eric Abrahamsen In-Reply-To: <874jde7j2c.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 09 Mar 2024 21:27:23 -0800") References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> Date: Sun, 10 Mar 2024 11:33:11 -0700 Message-ID: <87v85u5448.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eric Abrahamsen writes: > James Thomas writes: > >> Eli Zaretskii wrote: >> >>>> Date: Sun, 03 Mar 2024 07:22:29 +0530 >>>> From: James Thomas via "Bug reports for GNU Emacs, >>>> the Swiss army knife of text editors" >>>> >>>> Tags: patch >>>> >>>> Reproduction steps: >>>> >>>> - Setup Gnus with any group name having a slash ('/') such as >>>> "[Gmail]/Drafts" or an Atom feed (they usually have slashes) using the >>>> patch in bug#66188. >>>> >>>> - Press '*' on a message in the group. >>>> >>>> - Do (info "(gnus) Creating a Virtual Server") >>>> >>>> - Open the above from the Server buffer; RET on the new group fails. >>>> >>>> A patch is attached. I couldn't find the problematic commit or its >>>> original branch (where it was a consolidated merge from) but >>>> 'gnus-use-long-file-names' is apparently not meant for backends: it >>>> can't even be customized with that 'not-cache' option. I think this is >>>> the right way to solve it: the other lines removed in this patch are >>>> even older, but they were never being called due to the above reason. >>> >>> Eric, could you please review the patch and install if it's okay? >>> >>> Thanks. >> >> There's a small caveat after applying this: >> >> Before this patch, cache entries would've effectively ignored >> 'nnmail-use-long-file-names' (nil by default) and used long names. After >> this patch new entries would honor it, resulting in an extra directory >> tree for the same group. But only the original one would be opened (due >> to [[./lisp/gnus/nnmail.el::;; If this direc]]). To fix it, one would >> have to copy all the files in from the original directory into the new >> one (and retain the active file entry). Or of course, change the above >> variable (but that could have other implications depending upon one's >> configuration). > > Thanks for reporting this! Obviously something is wrong here, but I get > different results from your reproduction recipe (I'm running master): > when I create the cache nnml server and hit RET on it, I get: > > K 1: nnml:left.right > K 1: nnml:left/right > > I am able to subscribe to both groups. When I return to the *Group* > buffer, I can enter the version of the group with the ".", and read the > cached article, while attempting to enter the version with the slash > gives me "Invalid group (no such directory)". > > On disk, the "News/cache/active" file starts out with the version with > the ".", and after I create the extra cache server it contains both, it > looks like: > > "nnml:left.right" 1 1 y > "nnml:left/right" 1 1 y > > Meanwhile, the directory structure "News/cache/nnml:left/right/1" is > created. > > The "." in the active file comes from `gnus-cache-generate-active`, and > that mechanism seems to be working fine, at least in my case -- do you > not see that version of the group? > > To be honest I have no idea what's happening in `gnus-cache-file-name'. > I'd be hesitant to remove all that code without understanding it better > And I don't think we can argue that that code is "dead" just because it > is behind an option value that isn't one of the customization options. > > Anyway, it would be good to first know why you're not seeing the "." > version of the offending filename, and then I guess try to work out > what's going on with the file names. It kind of looks like a collision > between two different mechanisms -- one that translates "/" to "_" to > prevent unwanted filesystem hierarchies, and one that translates between > "/" and "." in order to convert newsgroup-name dot hierarchies into > filesystem hierarchies. In this case, it seems like "long names" and > newsgroup hierarchies shouldn't be applicable at all. I was briefly optimistic about the possibility that your previous patch, on bug#65467, might help address this issue. That patch did make it possible for nnml groups with slashes in the name to work correctly (they didn't, previously), but it still doesn't address this particular scenario. Meanwhile, I realize that my hesitation on that bug report is bogus, as everywhere else we already have active files with quotes in them, and `gnus-active-to-gnus-format' does a fair amount of work to handle various quoting situations. The real problem (well, one of the real problems) is that we should just have two central routines for reading and writing active files, so that there are only two places to keep in sync. Instead we have those two places, and then a smattering of other functions in other places that do something similar, and also have to be kept in sync, and I haven't done that. At the very least I'll need to apply your patch from 65467. The other real problem is that gnus-cache is confused about whether it wants to be a select method, or a modified version of article saving. The presence of `gnus-use-long-file-name' indicates the latter, but the manual's instructions about the nnml select method indicates the former. I think it should be a select method, which means that the group directory should be created in "News/cache" the same way it is created at the top level: with the "/" replaced by "_", and everything else using the proper "left/right" group name. Perhaps "long file names" can still play a role, but if so that should be via `nnmail-use-long-file-names', and gnus-cache in general should behave like a nnmail backend. Eric From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 21:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 69517@debbugs.gnu.org Cc: Eric Abrahamsen , Eli Zaretskii Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.171010637922059 (code B ref 69517); Sun, 10 Mar 2024 21:33:02 +0000 Received: (at 69517) by debbugs.gnu.org; 10 Mar 2024 21:32:59 +0000 Received: from localhost ([127.0.0.1]:38106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjQmw-0005ji-H4 for submit@debbugs.gnu.org; Sun, 10 Mar 2024 17:32:58 -0400 Received: from mout.gmx.net ([212.227.15.19]:40725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjQmt-0005jU-MQ for 69517@debbugs.gnu.org; Sun, 10 Mar 2024 17:32:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1710106327; x=1710711127; i=jimjoe@gmx.net; bh=Yr5BMPOgqYWOpa6v4IH3RQLm+uspKUGn95lTBpMrdOc=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=VPaXx8CLQ4w4WmKquqsu2jgGeLdaizQL03iZukPDQbLjj2D8n2vx8H3aQ9Vd15TP oA7LN53T2CyU91hXeKmZ6SnH4XDfaFYN73mV5yyCTpNopyfN5q9ZNHuDobyPXsvkI UvigkpR/W34byKLVlcZ3cg1Aw6pJt+jdI62kuwhNGa8omA3ors4CcnNuaRg3LlrNQ 05UTSwmHO5OuyREml7Ir4HvlrIMtrNQA4UsKFPjyM8WDn/wUnIxiXi6MepglMHgp2 mTUp1FOQfZdqc4/AP58BN3myYLADbSPGAdBQwov3eS+ESpz3EeLL/G8+TDyELmpAv YS+SvdeEOTIWkBfcPw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from user-Inspiron-15-5518 ([117.224.236.56]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1McpNo-1r9om41Unq-00ZtnP; Sun, 10 Mar 2024 22:32:07 +0100 From: James Thomas In-Reply-To: <874jde7j2c.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 09 Mar 2024 21:27:23 -0800") References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> Date: Mon, 11 Mar 2024 03:02:01 +0530 Message-ID: <87ttldu626.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:6JrNt7Z76yhkQgyvoEcFSglJEdr6mYrI+LJ9ONyh+zdB5VtqGho aWrd6dKuQ5FYcrKfy4h+VfmZAY6q4a75O/rQk/l6GQcjw+VhANYmf6rvcDcJAziJsl8Tchu MGOWqa/xjx+9x0tmKV7Ubo/NOzM/pJVqYPn3Hqu4Z8zr+k6M82q38thsBFS2SKcU4Pw1cVu mi5oWEEeJgyPLeuh5zWTg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:RwBOniPRWFI=;/tIGh1tv/gM1TPTuuHe0BxGKOAn Z7f5E+XcuWpEWHEJJ06J6HF3NSa07MYIAFC1Q4F5ym3SWBBy0yUn7Xt1bADkt6J5hSv94nzDi uFR4zFuIOSANDUsZWHzFb8Ng7DoBxeiN2hkuSj4Wee73+8etOhhww391MIfeWerKLzTinSi2g Pnj6kH1al/74Egcj+8xZ4wSUi+tVubMTLsCn+MBcPHhfgSuZFf/MHJYC5A5eOJX4RdE0Z/6Ki xo//HT93eDRJoF9g5jLKNI9JblYL18DWWN2di9N5e8YicUdNRWYYq2u8aw8XYR89PalhBIoTP E6NkkqYkRkjk2DrviqgRt7Y7a6EZ45zL4OojbKZvN8TFe02h3QParlM+d/oS1nrb/94ttfx7H yFsow2RJW2gTkPLAt0TnCKF8WOFqqJSgwlSinu9oU71ccMEIMS9mcjbD5WIKT74ravqU8vaiL gWYTsWgGKJeJs6Kx5rx5wAv2cNShntBPvz0ekOf/MgIUw/nN8p5T7NL20IJruqKahRMyECRxh P6+lh96u/zUqMxB9SedKa//zB4dZiylOzt9X2q5aMKkBF5xjubnZ18yfqrWgSduIq2fo25oKB OffDubAD94sVP2qttq6aeO1nWL64XL3ZGQaAPHiz96mLM9SbCDN3SYorNP8FEsOoQI9F+RR+J 4MH7RGxepeleMJwf5aHQMhxfCoowLfbhu/v5v79l2cFii+Q0TQp+2fmjL4ayyVvbeuKviBZdO KdL9Of9YKflmx0H8FCZNw3NEpa9goCvrBTIGTT3IrxhcRv6L8y0qDQ0JnBKipSJ+RiUVxBOVV ishHdhKIKKrCGcY61RDJsi8ZscGVB9yU3zkQwkbdgDck4= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) (This is an interim untested opinion before I can backup my existing messages and verify it...) Eric Abrahamsen wrote: > Thanks for reporting this! Obviously something is wrong here, but I get > different results from your reproduction recipe (I'm running master): > when I create the cache nnml server and hit RET on it, I get: > > K 1: nnml:left.right > K 1: nnml:left/right > > I am able to subscribe to both groups. When I return to the *Group* > buffer, I can enter the version of the group with the ".", and read the > cached article, while attempting to enter the version with the slash > gives me "Invalid group (no such directory)". > > On disk, the "News/cache/active" file starts out with the version with > the ".", and after I create the extra cache server it contains both, it > looks like: > > "nnml:left.right" 1 1 y > "nnml:left/right" 1 1 y > > Meanwhile, the directory structure "News/cache/nnml:left/right/1" is > created. > > The "." in the active file comes from `gnus-cache-generate-active`, and > that mechanism seems to be working fine, at least in my case -- do you > not see that version of the group? `gnus-cache-generate-active` seems to be run if the active file doesn't exist already (i.e. at the very start when creating a server): I was adding new groups to an existing server. If my guess is right, that first line with the dot being generated is a way of reversing the earlier 'dot -> slash' when turning a group into a directory name. That should be fixed as well if group names with slash have to be supported. > while attempting to enter the version with the slash gives me "Invalid > group (no such directory)". Could you try entering it with this patch applied? > > To be honest I have no idea what's happening in `gnus-cache-file-name'. > I'd be hesitant to remove all that code without understanding it better > And I don't think we can argue that that code is "dead" just because it > is behind an option value that isn't one of the customization options. > > Anyway, it would be good to first know why you're not seeing the "." > version of the offending filename, and then I guess try to work out > what's going on with the file names. It kind of looks like a collision > between two different mechanisms -- one that translates "/" to "_" to > prevent unwanted filesystem hierarchies, and one that translates between > "/" and "." in order to convert newsgroup-name dot hierarchies into > filesystem hierarchies. In this case, it seems like "long names" and > newsgroup hierarchies shouldn't be applicable at all. I think if the original group name contains dots, that should be part of the hierarchy. But not slashes. > The other real problem is that gnus-cache is confused about whether it > wants to be a select method, or a modified version of article saving. > The presence of `gnus-use-long-file-name' indicates the latter, but > the manual's instructions about the nnml select method indicates the > former. Hmm.. > I think it should be a select method, which means that the group > directory should be created in "News/cache" the same way it is created > at the top level: with the "/" replaced by "_", and everything else > using the proper "left/right" group name. Perhaps "long file names" > can still play a role, but if so that should be via > `nnmail-use-long-file-names', and gnus-cache in general should behave > like a nnmail backend. I think this patch is on those lines, isn't it? Regards, James From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2024 03:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 69517@debbugs.gnu.org Cc: Eric Abrahamsen , Eli Zaretskii Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.171038683817289 (code B ref 69517); Thu, 14 Mar 2024 03:28:01 +0000 Received: (at 69517) by debbugs.gnu.org; 14 Mar 2024 03:27:18 +0000 Received: from localhost ([127.0.0.1]:47690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkbkT-0004Um-Jh for submit@debbugs.gnu.org; Wed, 13 Mar 2024 23:27:18 -0400 Received: from mout.gmx.net ([212.227.15.18]:43181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkbkR-0004UZ-3h for 69517@debbugs.gnu.org; Wed, 13 Mar 2024 23:27:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1710386784; x=1710991584; i=jimjoe@gmx.net; bh=/QY8IyLHPUCQWUXmnwFKAJ7SPMB65F7kOmnnGWkfPJU=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:Date: References; b=AMYSTtBKcG5w5IVXOW399PksbwatYm7GnoHvwbW5bNMsVMA/m/hQVCIAdHVsuNNg UA2qhWBnHJSQKKEErR6MY6EPw5QV6TbxyeBPYb6oCdHJw3i2/I1gaTNc3J7RvuXiJ xQfZofeq48FnfFtHV8nFL6GLbAtM1vBbUH08G4+SmtPsXusE/VMsFsdmyjFZxjUfK b8QkP7tFAA3l80Nkd0dsZZd3OLT4lAeU5cBb6oxLVu13xzm6yTU5eZl5OAHECCifI y2MIRYwYl5CgmaGg53nEAscG8zr6d8cIsMldYajGvdcYJsDfm8FFJZlUWY9QZWbTg karNK+JOVagT1V/4lA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from user-Inspiron-15-5518 ([117.212.173.1]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MiaY9-1r7z7g2ovH-00ffGu; Thu, 14 Mar 2024 04:26:24 +0100 From: James Thomas In-Reply-To: <87v85u5448.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 10 Mar 2024 11:33:11 -0700") Date: Thu, 14 Mar 2024 08:56:08 +0530 Message-ID: <8734sttrxr.fsf@gmx.net> References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> <87v85u5448.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:fk0AV6tHo66reiGU02WTe1FZdCTmqhjAqqTJ9o4AGZFsrolBwbS 2oI/nMibn4GD63vlTq3vOjvHWYvTIUf89CgeeHl/qjhmMzB+EAHeg9d7V5iDqW0uDTlhy51 gLb7rqiB54I5YJMe9fTGW3jiYRwfP3CFxzNKK77am3PZI9KQKu3C7Y2hWBl22S6RfNS4k02 AKouKcy4+eCGurzxseWEQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:5q8ygdtRwrU=;6o3zh73YijTjmTo9DAepQEh81o1 q9ipcw+HCESWzTywp/Jy+fazhcCXSrm++h9nUSFejlwTdGSaGu2aq8Lt+N1w9sJNcC4ycqYqH YGRaaR+KMma0iwnqTKzdFi6EkHFkeiW8qMgEYFmLIObhR6BK8ZlrJMkuHqA3ZiD2ZN6k3bTEi C5dDv45B3wQGUXK3JK66yJXd1z+R+pZI7umA7pvZFmIa2HhCRlJ1sEeZg1iP4jR9ay9SSnzOM t6bVW/VzMtI2gcUueGWx7WrOH7vMe+BFroOjUITeIYrmcnutKTzuz+QBKIZBYNeozcLnWNKUc NpmWrBBjYh1o2vhWZe3cdyaZcYm2QrI7jta9XIPRmrP4xM7/aqYJWhEfOQfvL1VBI8kj/DHDf MbKojFtCjUgYk41dgJvwCzEVVr9nxGaVjKIAp8oGNuipAiZO7fMsY9HmytItmKlhGAHRkzsLq pmxsxkCHHEz3E1bsYw8OHt3oyOXWX3zmwnznguHAyJkr2jj4n3d1tu6PLSqkqMf1e6U01kxtR XBV2yvnM5rXr4MjUX74VI/QJdWZZe9hqI6MyvqNQ/Bta57ZJW4Gh7nRIGaUkmLQj6LPziqznO 22vzIfvBDtMKMWbAC9UHkHbAgnUu/9NmQtpu9S8ru3OmLmJuT1E/LWovmvwz6VN7rQjRisGb5 LJ9ZFMY/yl5b8VbPFWEYE23IjX7pszY4NTXxywTzNE1NAN/UKoNWLRdRWVcYV2dWHtWAE91QD 9g/Bb6o2YN3zT/W9E8Op9wTpuxEvdF382QqAowyfDeGN3KfmjTjyXvay0j6aWVPz1Ak8yFuIu A++8OG13J2Ssi+UnhdKGsurrfXXLxuy37Gnz+FJXpjAbc= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Eric Abrahamsen wrote: > The real problem (well, one of the real problems) is that we should just > have two central routines for reading and writing active files, so that > there are only two places to keep in sync. Instead we have those two > places, and then a smattering of other functions in other places that do > something similar, and also have to be kept in sync, and I haven't done > that. At the very least I'll need to apply your patch from 65467. > > The other real problem is that gnus-cache is confused about whether it > wants to be a select method, or a modified version of article saving. > The presence of `gnus-use-long-file-name' indicates the latter, but the > manual's instructions about the nnml select method indicates the former. > > I think it should be a select method, which means that the group > directory should be created in "News/cache" the same way it is created > at the top level: with the "/" replaced by "_", and everything else > using the proper "left/right" group name. Perhaps "long file names" can > still play a role, but if so that should be via > `nnmail-use-long-file-names', and gnus-cache in general should behave > like a nnmail backend. Well, I have sort of, an approach based on my earlier patch: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Make-gnus-cache-work-with-group-names-having.patch Content-Transfer-Encoding: quoted-printable =46rom 0f5d693dc439b11294b3bde3dc9129bdf45a2179 Mon Sep 17 00:00:00 2001 From: James Thomas Date: Thu, 14 Mar 2024 08:42:00 +0530 Subject: [PATCH] Make gnus cache work with group names having '/' Make `gnus-cache-file-name` use the existing `nnmail-group-pathname`. * lisp/gnus/gnus-cache.el (gnus-cache-file-name) (gnus-cache-update-article): * lisp/gnus/nnmail.el (nnmail-group-pathname): =2D-- lisp/gnus/gnus-cache.el | 27 +++++++-------------------- lisp/gnus/nnmail.el | 3 ++- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 961219eee8f..7af02368d36 100644 =2D-- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -443,23 +443,9 @@ gnus-cache-member-of-class (and (not unread) (not ticked) (not dormant) (memq 'read class)))) (defun gnus-cache-file-name (group article) - (expand-file-name - (if (stringp article) article (int-to-string article)) - (file-name-as-directory - (expand-file-name - (nnheader-translate-file-chars - (if (gnus-use-long-file-name 'not-cache) - group - (let ((group (nnheader-replace-duplicate-chars-in-string - (nnheader-replace-chars-in-string group ?/ ?_) - ?. ?_))) - ;; Translate the first colon into a slash. - (when (string-match ":" group) - (setq group (concat (substring group 0 (match-beginning 0)) - "/" (substring group (match-end 0))))) - (nnheader-replace-chars-in-string group ?. ?/))) - t) - gnus-cache-directory)))) + (nnmail-group-pathname + group gnus-cache-directory + (if (stringp article) article (int-to-string article)))) (defun gnus-cache-update-article (group article) "If ARTICLE is in the cache, remove it and re-enter it." @@ -699,9 +685,10 @@ gnus-cache-generate-active (file-name-as-directory (expand-file-name gnus-cache-directory)))) (directory-file-name directory)) - (nnheader-replace-chars-in-string - (substring (directory-file-name directory) (match-end 0)) - ?/ ?.))) + (url-unhex-string + (nnheader-replace-chars-in-string + (substring (directory-file-name directory) (match-end 0)) + ?/ ?.)))) nums alphs) (when top (gnus-message 5 "Generating the cache active file...") diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index fef12eebe09..a9f5b89c6fe 100644 =2D-- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -33,6 +33,7 @@ (require 'mail-source) (require 'mm-util) (require 'gnus-int) +(require 'browse-url) (autoload 'mail-send-and-exit "sendmail" nil t) @@ -627,7 +628,7 @@ nnmail-group-pathname (concat (let ((dir (file-name-as-directory (expand-file-name dir)))) (setq group (nnheader-replace-duplicate-chars-in-string - (nnheader-replace-chars-in-string group ?/ ?_) + (browse-url-url-encode-chars group "[/%]") ?. ?_)) (setq group (nnheader-translate-file-chars group)) ;; If this directory exists, we use it directly. =2D- 2.34.1 --=-=-= Content-Type: text/plain James Thomas wrote: > + (if (not nnmail-use-long-file-names) > + (nnheader-replace-chars-in-string group ?. ?/) > + group)) Since directory names cannot have '/' they used to be replaced by '_' in group names before conversion. But this makes it impossible, when generating (non-existent) active files to know whether a '_' in the directory name was _ or / originally. The above patch tries a possible solution inspired from [1] but would break existing users of the cache or agent (xref-find-references "nnmail-group-pathname") who have groups with % or / in their names. Seems to work in my limited testing. WDYT? Regards, James 1: https://stackoverflow.com/questions/9847288/is-it-possible-to-use-in-a-filename#answer-9847319 --=-=-=-- From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: Daniel Semyonov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Mar 2024 17:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: James Thomas Cc: Eric Abrahamsen , Eli Zaretskii , 69517@debbugs.gnu.org Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.17105240849771 (code B ref 69517); Fri, 15 Mar 2024 17:35:02 +0000 Received: (at 69517) by debbugs.gnu.org; 15 Mar 2024 17:34:44 +0000 Received: from localhost ([127.0.0.1]:53700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlBS8-0002XX-EP for submit@debbugs.gnu.org; Fri, 15 Mar 2024 13:34:44 -0400 Received: from dsemy.com ([46.23.89.208]:46590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlBS4-0002XI-OZ for 69517@debbugs.gnu.org; Fri, 15 Mar 2024 13:34:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=dkim; bh=lhMUawaL2yEzs GRAAwwwZO95qpx8q8VEWdDi5AwDJYk=; h=date:references:in-reply-to: subject:cc:to:from; d=dsemy.com; b=lTbkGpqxz9pCV4VLw68RFN0pDhXkEnTxqjD tRn91qBjTpAiXv38gVmd3nn3izvrDbQftnNIo+Dw3D2u159TWh7y1HSy1A9mbGLeupfjmG RruzVv35sAX993i+ZySOpDCHUbXRnM+gLFo3zvuRT9vFrdjb7FcOY+JOBI3q4NfYGyXvLM WM0HIAv6v2PX7Olg2+fAjVZrexeIn6mlAxx1N/U+zoss0CdrA+U8o/dd51zes69CQCDz14 AhbhEBj3m17dU7mFAcc6RCftdE8xuWwM+gX+pJfKCdW47WPh1ASIBnRQpEphGlf8pOSoX6 v0iqxXvh4/g3gRu/UoAyYdUqCLw== Received: from coldharbour.local ( [147.235.219.6]) by dsemy.com (OpenSMTPD) with ESMTPSA id 487845a6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 15 Mar 2024 18:33:57 +0100 (CET) Received: from localhost (coldharbour.local [local]) by coldharbour.local (OpenSMTPD) with ESMTPA id 179a3d64; Fri, 15 Mar 2024 17:33:42 +0000 (UTC) From: Daniel Semyonov In-Reply-To: <8734sttrxr.fsf@gmx.net> (James Thomas's message of "Thu, 14 Mar 2024 08:56:08 +0530") References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> <87v85u5448.fsf@ericabrahamsen.net> <8734sttrxr.fsf@gmx.net> Date: Fri, 15 Mar 2024 19:33:42 +0200 Message-ID: <87zfuzcscp.fsf@dsemy.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>>>> James Thomas writes: > Eric Abrahamsen wrote: >> The real problem (well, one of the real problems) is that we should just >> have two central routines for reading and writing active files, so that >> there are only two p [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [147.235.219.6 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>>>> James Thomas writes: > Eric Abrahamsen wrote: >> The real problem (well, one of the real problems) is that we should just >> have two central routines for reading and writing active files, so that >> there are only two p [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [147.235.219.6 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager >>>>> James Thomas writes: > Eric Abrahamsen wrote: >> The real problem (well, one of the real problems) is that we should just >> have two central routines for reading and writing active files, so that >> there are only two places to keep in sync. Instead we have those two >> places, and then a smattering of other functions in other places that do >> something similar, and also have to be kept in sync, and I haven't done >> that. At the very least I'll need to apply your patch from 65467. >> >> The other real problem is that gnus-cache is confused about whether it >> wants to be a select method, or a modified version of article saving. >> The presence of `gnus-use-long-file-name' indicates the latter, but the >> manual's instructions about the nnml select method indicates the former. >> >> I think it should be a select method, which means that the group >> directory should be created in "News/cache" the same way it is created >> at the top level: with the "/" replaced by "_", and everything else >> using the proper "left/right" group name. Perhaps "long file names" can >> still play a role, but if so that should be via >> `nnmail-use-long-file-names', and gnus-cache in general should behave >> like a nnmail backend. > Well, I have sort of, an approach based on my earlier patch: [patch] > James Thomas wrote: >> + (if (not nnmail-use-long-file-names) >> + (nnheader-replace-chars-in-string group ?. ?/) >> + group)) > Since directory names cannot have '/' they used to be replaced by '_' in > group names before conversion. But this makes it impossible, when > generating (non-existent) active files to know whether a '_' in the > directory name was _ or / originally. > The above patch tries a possible solution inspired from [1] but would > break existing users of the cache or agent (xref-find-references > "nnmail-group-pathname") who have groups with % or / in their names. > Seems to work in my limited testing. WDYT? I tested it and it seems to work, but I'm pretty sure it will also break existing groups with % or / in their names in several backends. For example, the `nnmh' and `nndiary' backends use this function to locate groups on disk, which will fail for those groups (unless users rename the files manually). FWIW I think this approach is good, but since Gnus doesn't even emit a warning currently when creating a group with % in its name, I don't think breaking these groups is a good idea. Daniel From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Mar 2024 00:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Daniel Semyonov Cc: Eric Abrahamsen , Eli Zaretskii , 69517@debbugs.gnu.org Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.171054861520281 (code B ref 69517); Sat, 16 Mar 2024 00:24:01 +0000 Received: (at 69517) by debbugs.gnu.org; 16 Mar 2024 00:23:35 +0000 Received: from localhost ([127.0.0.1]:53910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlHpn-0005H3-0U for submit@debbugs.gnu.org; Fri, 15 Mar 2024 20:23:35 -0400 Received: from mout.gmx.net ([212.227.17.22]:47577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlHpl-0005Gp-5w for 69517@debbugs.gnu.org; Fri, 15 Mar 2024 20:23:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1710548559; x=1711153359; i=jimjoe@gmx.net; bh=feNsrcWdgnSjl1o8JYNTOtkkUBmIZSqDiA06yR+TjxA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:Date: References; b=G/nsWOxHrnISd93mpSo9JYDfo+ZOnxuLoeYaMUWopXs9cDHCyVO3otj5OwL5kc41 CdvcU0kfuF1+eZsmyjXBRCQyQQKq8YnmmjXmRCQhmRoabay4SCOnIJ1b9H58kp+u+ c3iCZJtdcQunYnY1ki/JAkEnSv5gL72kRFc7baMEWxdJun0jjkwY2lFGbjfBLIOZM +Dz6XCbOhMfHeB/4zBf3Ljm2kcd76z2ngr5LxW2oNmIW6ZTO1qnWFpR/z/Ltk53Jn b7e6ajrzLaRFRe3CgixviP84MiptcNcZ4KdXco3ILLltKUgyZ/Js3vJ7LdGqwg2C3 dbxg8r3nnotG3tVp6A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from user-Inspiron-15-5518 ([59.182.112.198]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MmDIu-1r37Ne3tFw-00iBvl; Sat, 16 Mar 2024 01:22:39 +0100 From: James Thomas In-Reply-To: <87zfuzcscp.fsf@dsemy.com> (Daniel Semyonov's message of "Fri, 15 Mar 2024 19:33:42 +0200") Date: Sat, 16 Mar 2024 05:52:30 +0530 Message-ID: <87le6jowjd.fsf@outlook.com> References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> <87v85u5448.fsf@ericabrahamsen.net> <8734sttrxr.fsf@gmx.net> <87zfuzcscp.fsf@dsemy.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:kc2QYPIiJRprLLp/oygXfA1cU31U8avAE35WHqwFkYpq64rG+bd aicKVuAVcgz3VscwUbdxWdktN9Lbw4eCnnHOVn6XpSbhm676KfVs0qUS0ZXb7EN3+aQPmMZ Es8R6339MhM6tIPtaTCkE+z0Ykc1IDgo/SIXUQt2Mv702DkzzRY9pSFyHXKHTQ5rZaEteIp FCs+oUe9qhfN6hFfBHK0g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:2a1uRFs9bWk=;qvLO6aobJdnJK0lkWZbKmlvSpxG jxc9w6f6NVtnF06r+514MNFNPwZWpBq9wOYTXXIROHnE/8wToYuorZQ6iIIG3XE1LeIHi5K8e +9DvBnR+3tcN7bLf2OL6slDUdN6orRcsjMfnFcQOxC5cwE9FyWjzCl0/4822lbpMEpzaLXYEz mIG7gA/myfYsVgxl+doiaokW8nGkhpn0wVXEyrZZrGGIntbyU9slIPzDdRABcuLqJyw06EUpS 1IZ/rdt0+UQ7anLcEt0YX4gDRY0tdRdZCFS5dbFlqkHtSwlM9qTzvMsPvcXYpmdXhIP7pPyJL g2uhypvgPQcwEeMEAnP3XHzjRKNVnhgm8rdcya3UmSAvbPFuKVQqlkcaibZiO+342oOFMTaRr /sPJEjF1A1FSAp1DiHYS80AdWDDOWs5Mik2BC8HBTwaznx5pT+ibmj7H/K5V8kXEJy1gIV02V aEN/i32k/o5VV2plte1F0B3gHuHicI8rxgGJ+0wfjOjkq/W9wC+mXd19p2VKmCBsQboJF2qv9 VmzyQ8HKwr85zAdOpzEKAsdtuwxVw/Sz7VBQM+l5vLOh/Hy92iKLMKp8BFVcviM7n0ppeJt0A Sd7cQlGhvD3L9fA+q5mbWoClcv5AIiBJwATclIo3lu+bH0HJSZtBaeWcqNz3XAAM0q/x603RO XoAdsKrlUNXxjLlWc3zQGq3I9Hb0Xh5YCHAaU90TmaqWRgUCHFdLF/M3VmFlEa+P62epEfNg7 3QMprInyX0q557f7oUr+u7+NdIjW3/ond54/h9zWHl0ZYUbeyz2ZsPo1dzSsAy4gqeoHWdi3q RD8sPWGPjbAoeWn8pgAoIGVnToggELVeNqyp4O4RST/AM= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Daniel Semyonov wrote: >>>>>> James Thomas writes: > > > James Thomas wrote: > > >> + (if (not nnmail-use-long-file-names) > >> + (nnheader-replace-chars-in-string group ?. ?/) > >> + group)) > > > Since directory names cannot have '/' they used to be replaced by '_' in > > group names before conversion. But this makes it impossible, when > > generating (non-existent) active files to know whether a '_' in the > > directory name was _ or / originally. > > > The above patch tries a possible solution inspired from [1] but would > > break existing users of the cache or agent (xref-find-references > > "nnmail-group-pathname") who have groups with % or / in their names. > > > Seems to work in my limited testing. WDYT? > > I tested it and it seems to work, but I'm pretty sure it will also break > existing groups with % or / in their names in several backends. > For example, the `nnmh' and `nndiary' backends use this function to > locate groups on disk, which will fail for those groups (unless users > rename the files manually). I think only one of these combinations is likely to be a problem in practice: groups such as [Gmail]/Drafts. I've never seen a % in a group name. The cache wouldn't work for one with / anyway (this bug) and as far as the agent is concerned, none of the Gmail groups with spaces in them work anyway (bug#65467: note that the patch on this is also needed for the agent to work on these groups with /). I haven't used nnmh or nndiary but I don't think they normally use group names with '/'. Regards, James From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Mar 2024 09:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Daniel Semyonov Cc: eric@ericabrahamsen.net, 69517@debbugs.gnu.org, jimjoe@gmx.net Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.171161895216827 (code B ref 69517); Thu, 28 Mar 2024 09:43:02 +0000 Received: (at 69517) by debbugs.gnu.org; 28 Mar 2024 09:42:32 +0000 Received: from localhost ([127.0.0.1]:39091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpmHH-0004NL-UO for submit@debbugs.gnu.org; Thu, 28 Mar 2024 05:42:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpmHG-0004N7-6t for 69517@debbugs.gnu.org; Thu, 28 Mar 2024 05:42:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpmH9-0008Ky-Rd; Thu, 28 Mar 2024 05:42:23 -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=S2N5k/+GxFhtIfC+0LWAX66trdFttZM/p36k54JKTio=; b=WjTWS8vbrtqC LvVGLvT77KpvvxjZM2N8edCOVewXMMKLYDnw0+j7cfxIxMzZPYgEqFhcbxJ0Xeqg76CM2iXQnfVBG 6muUoaV0sxSsQPGIChoOEH2FrMR86QX91c+snjRxbUYCrXOXU/oOiYAP7qDN0v7+BW2n5x9HAUl3K RkwlFAS8TjpEEk3Qn2aLfIKUkFX0stv0N/1GyKs5Cx+hScO3GASWn8ZNc7LwEVQbhZNOajVjVGoJn i+Yn65/hMz9llC9Bnw6l88LHlNNTe4EU+lvjVvN/EpXoAJh/8hWGrwxb7gdoo2TrmvL1vTXco02Xl 0zp4Chgj7cSnYfEHCKp/iQ==; Date: Thu, 28 Mar 2024 11:42:00 +0200 Message-Id: <86h6gqhevr.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87zfuzcscp.fsf@dsemy.com> (message from Daniel Semyonov on Fri, 15 Mar 2024 19:33:42 +0200) References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> <87v85u5448.fsf@ericabrahamsen.net> <8734sttrxr.fsf@gmx.net> <87zfuzcscp.fsf@dsemy.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! Is there anything else left to be done here, or should we close this? > From: Daniel Semyonov > Cc: 69517@debbugs.gnu.org, Eric Abrahamsen , Eli > Zaretskii > Date: Fri, 15 Mar 2024 19:33:42 +0200 > > >>>>> James Thomas writes: > > > Eric Abrahamsen wrote: > >> The real problem (well, one of the real problems) is that we should just > >> have two central routines for reading and writing active files, so that > >> there are only two places to keep in sync. Instead we have those two > >> places, and then a smattering of other functions in other places that do > >> something similar, and also have to be kept in sync, and I haven't done > >> that. At the very least I'll need to apply your patch from 65467. > >> > >> The other real problem is that gnus-cache is confused about whether it > >> wants to be a select method, or a modified version of article saving. > >> The presence of `gnus-use-long-file-name' indicates the latter, but the > >> manual's instructions about the nnml select method indicates the former. > >> > >> I think it should be a select method, which means that the group > >> directory should be created in "News/cache" the same way it is created > >> at the top level: with the "/" replaced by "_", and everything else > >> using the proper "left/right" group name. Perhaps "long file names" can > >> still play a role, but if so that should be via > >> `nnmail-use-long-file-names', and gnus-cache in general should behave > >> like a nnmail backend. > > > Well, I have sort of, an approach based on my earlier patch: [patch] > > > James Thomas wrote: > > >> + (if (not nnmail-use-long-file-names) > >> + (nnheader-replace-chars-in-string group ?. ?/) > >> + group)) > > > Since directory names cannot have '/' they used to be replaced by '_' in > > group names before conversion. But this makes it impossible, when > > generating (non-existent) active files to know whether a '_' in the > > directory name was _ or / originally. > > > The above patch tries a possible solution inspired from [1] but would > > break existing users of the cache or agent (xref-find-references > > "nnmail-group-pathname") who have groups with % or / in their names. > > > Seems to work in my limited testing. WDYT? > > I tested it and it seems to work, but I'm pretty sure it will also break > existing groups with % or / in their names in several backends. > For example, the `nnmh' and `nndiary' backends use this function to > locate groups on disk, which will fail for those groups (unless users > rename the files manually). > > FWIW I think this approach is good, but since Gnus doesn't even emit a > warning currently when creating a group with % in its name, I don't > think breaking these groups is a good idea. > > Daniel > From unknown Sat Jun 14 19:20:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Mar 2024 00:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69517 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: eric@ericabrahamsen.net, Daniel Semyonov , 69517@debbugs.gnu.org Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.171167101911500 (code B ref 69517); Fri, 29 Mar 2024 00:11:01 +0000 Received: (at 69517) by debbugs.gnu.org; 29 Mar 2024 00:10:19 +0000 Received: from localhost ([127.0.0.1]:41302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpzp4-0002zP-H8 for submit@debbugs.gnu.org; Thu, 28 Mar 2024 20:10:18 -0400 Received: from mout.gmx.net ([212.227.17.21]:59319) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpzp0-0002yS-UZ for 69517@debbugs.gnu.org; Thu, 28 Mar 2024 20:10:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1711670996; x=1712275796; i=jimjoe@gmx.net; bh=iB1X52Ox8oYclANbwoPmXRHaSnX0DGG2AXH+i+DlQ+o=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=f7WjMaG8lj5TM9jt6TBCC2FyaFXAAiDlpQ/WBii9OFYclDMvcksgPWNYI73qMXKH eg0paCKMFS/1lk6u1UdBct2k95GFxPCx/L4/dwTPAFrXd2lPrZuzqmUYWji+ls1aF +UxmU5HEKD9D0bSxLX+qWA9OZDP6+vsstS/h+Nq3IAY90xXCDyIWxwMXXyFsMkEjM 9uxElaoLP9pT5b1FvtRWs/8um5PcqM4gfUj/B/8EeyB0Y5fSeXmeuFnU7PNcuA+87 vT5g7TqabWUEFucDzAX0RyiLE/+SD3W1udHna5qNQeym/5PPNq3QW2LW+eQEBxB6u kKEhbPuHUb8/YcojqA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from user-Inspiron-15-5518 ([59.92.166.60]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1M4s0t-1rocEu2En1-001yii; Fri, 29 Mar 2024 01:09:56 +0100 From: James Thomas In-Reply-To: <86h6gqhevr.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 28 Mar 2024 11:42:00 +0200") References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> <87v85u5448.fsf@ericabrahamsen.net> <8734sttrxr.fsf@gmx.net> <87zfuzcscp.fsf@dsemy.com> <86h6gqhevr.fsf@gnu.org> Date: Fri, 29 Mar 2024 05:39:50 +0530 Message-ID: <87y1a199v5.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:A90tyZuQT5vKoQx/xjguBhrakDQ6F4Bl3mhbg+iKrNi5+4wPBcr kT2jBOsGCbX9u94Kd63skv/Bzmw93Cxvvkc+nu9N6p2I2fpDHOs1HS6mWLHne6aBl4/PUQQ SURR0FOsSL7Gg39NCFk53+TlEycrmosZ2XnIoZSrv9XuffFbCV6RKf9X9hCRxLEN+XcHsQN JAJYLPySnf7lY6HHeKCEA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:8aUH6kTGjMg=;pJjLAFFDmNhVjFlUJKzoCcoISrG XCVezWW+lk4OFRP91pEEMLtpshZKPLMozZBhw+TF2+n9mbW1NWC40+7B8LAkP8Nk0Z9rNUVnu qeUd+mZvsXWK5us0bb0eqOdjfJXQ1pVykOZHvHajvtkxl/EqhvcRt5aeC9tCCD+gnneyyXG3x 5a+FFULLxKTJ02d+wOl2NC/SNYqdg7/FX7evWui2LPRLi0GIR3bOTpYzGKOSpQLrsroRfKiZ2 FchWFNjkigPrXvoI8YWt0AaUfAKBJlxYan1V9HCKORjN+e7F1TD/sUY65pC0zh0ttdBoxY2bi lvdSUiJPRY7elpljVZPkbTIoReh15W4N/g5oiLHgXsvlelvjCjFvqnaxLaTTqEMLrlR31Bsh2 hxEziB+tpASagbjF0Sac3LoxR1+atfvCQC0fZuKN5pJjG/1MNMXQzLd1lqJyqI1B153ZHmecM zvmKsFuQm/Ci31KlmMwtkMTThVEWEHkmyIAkBmE3PtbdOCM2Abk1ibEe9ye3oX8YM2r3oDMPi eKhpfZV+czzjCfK6v3ji6niVZSvvLdxqAGuqv0VxfzdzFaS8KdSOYnaofsrgNA0ia3hwHm1j9 hb3qVrPf8qDEGPzuIl+R1rj/g2zpwlgbNIQZhnIzahyK8GkyPeYBXpiMcIVzY9FrSlktZtkoL FiFLkvtvaKbMxegaekbfi0sGuIIQSGMLkmxMb738XeqvxHjXnWBJxszjnB5qSiLF60dbcMP7/ 6sNAzogq00sir3TOPoZm6bycbTy0foBx7QkzmadZQUWIB8LB4MtIQlIB+bC/ApMV22h4DohD6 yfrDCymIKXjAQtKgvZEOl6GReUEbHjDqihfv6syTXzsJQ= Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) Eli Zaretskii wrote: > Ping! Is there anything else left to be done here, or should we close > this? > >> From: Daniel Semyonov >> Cc: 69517@debbugs.gnu.org, Eric Abrahamsen , = Eli >> Zaretskii >> Date: Fri, 15 Mar 2024 19:33:42 +0200 >> >> >>>>> James Thomas writes: >> >> > Eric Abrahamsen wrote: >> >> The real problem (well, one of the real problems) is that we sho= uld just >> >> have two central routines for reading and writing active files, = so that >> >> there are only two places to keep in sync. Instead we have those= two >> >> places, and then a smattering of other functions in other places= that do >> >> something similar, and also have to be kept in sync, and I haven= 't done >> >> that. At the very least I'll need to apply your patch from 65467= . >> >> >> >> The other real problem is that gnus-cache is confused about whet= her it >> >> wants to be a select method, or a modified version of article sa= ving. >> >> The presence of `gnus-use-long-file-name' indicates the latter, = but the >> >> manual's instructions about the nnml select method indicates the= former. >> >> >> >> I think it should be a select method, which means that the group >> >> directory should be created in "News/cache" the same way it is c= reated >> >> at the top level: with the "/" replaced by "_", and everything e= lse >> >> using the proper "left/right" group name. Perhaps "long file nam= es" can >> >> still play a role, but if so that should be via >> >> `nnmail-use-long-file-names', and gnus-cache in general should b= ehave >> >> like a nnmail backend. >> >> > Well, I have sort of, an approach based on my earlier patch: [pat= ch] >> >> > James Thomas wrote: >> >> >> + (if (not nnmail-use-long-file-names) >> >> + (nnheader-replace-chars-in-string group ?. ?/) >> >> + group)) >> >> > Since directory names cannot have '/' they used to be replaced by= '_' in >> > group names before conversion. But this makes it impossible, when >> > generating (non-existent) active files to know whether a '_' in t= he >> > directory name was _ or / originally. >> >> > The above patch tries a possible solution inspired from [1] but w= ould >> > break existing users of the cache or agent (xref-find-references >> > "nnmail-group-pathname") who have groups with % or / in their nam= es. >> >> > Seems to work in my limited testing. WDYT? >> >> I tested it and it seems to work, but I'm pretty sure it will also brea= k >> existing groups with % or / in their names in several backends. >> For example, the `nnmh' and `nndiary' backends use this function to >> locate groups on disk, which will fail for those groups (unless users >> rename the files manually). >> >> FWIW I think this approach is good, but since Gnus doesn't even emit a >> warning currently when creating a group with % in its name, I don't >> think breaking these groups is a good idea. >> >> Daniel >> I've been using this since then, on master, with no problems. Let me add to my earlier reasons for being confident about this not breaking existing setups: James Thomas wrote: > I think only one of these combinations is likely to be a problem in > practice: groups such as [Gmail]/Drafts. I've never seen a % in a > group name. The cache wouldn't work for one with / anyway (this bug) > and as far as the agent is concerned, none of the Gmail groups with > spaces in them work anyway (bug#65467: note that the patch on this is > also needed for the agent to work on these groups with /). I haven't > used nnmh or nndiary but I don't think they normally use group names > with '/'. The only ones with '/' (and no spaces) I know of are the Gmail groups, namely: [Gmail]/Bin [Gmail]/Drafts [Gmail]/Important [Gmail]/Spam [Gmail]/Starred ...which are unlikely to be agentized because of their nature (though ideally the patch at bug#65467 ought to be applied as well, after this). Moreover, getting Gmail to work with Gnus requires a paid account and a complicated setup with OAuth2 (AFAIK, because I use one) which only few people are likely to have managed. Lastly, the fix for such an unlikely existing setup is a simple rename of the directory: say, from [Gmail]_Drafts to [Gmail]%2FDrafts. Regards, James From unknown Sat Jun 14 19:20:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: James Thomas Subject: bug#69517: closed (Re: bug#69517: [PATCH] Make gnus cache work with group names having '/') Message-ID: References: <87jzlj5pki.fsf@ericabrahamsen.net> <87wmqkcc9u.fsf@outlook.com> X-Gnu-PR-Message: they-closed 69517 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 69517@debbugs.gnu.org Date: Sat, 30 Mar 2024 22:22:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1711837322-8779-1" This is a multi-part message in MIME format... ------------=_1711837322-8779-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #69517: [PATCH] Make gnus cache work with group names having '/' which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 69517@debbugs.gnu.org. --=20 69517: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69517 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1711837322-8779-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 69517-done) by debbugs.gnu.org; 30 Mar 2024 22:21:15 +0000 Received: from localhost ([127.0.0.1]:46282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqh4c-0002Fd-SH for submit@debbugs.gnu.org; Sat, 30 Mar 2024 18:21:15 -0400 Received: from mail.ericabrahamsen.net ([52.70.2.18]:36052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqh4Z-0002F4-Ja for 69517-done@debbugs.gnu.org; Sat, 30 Mar 2024 18:21:14 -0400 Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 01D60FA059; Sat, 30 Mar 2024 22:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1711837263; bh=vmqDK03X6Mq2bX/+Lh9RbiMQZabyliddTJk8ayfvb70=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=TdUQBtVla4FZRe9p6XGdTZxuFUNdLfFhM0ITYZkua21SCvmAY+px3k4UNnt+zxcQ9 BCd/l55VNevKCU+jTNUpKlS7pT5iuHyxbEwbHSjfWBT47Ph0YwmxDxVYmGawAFgCrU yrGBvcHER+PhdPgWSCUNVv9UGDK1i/+VFXGDE4Jw= From: Eric Abrahamsen To: James Thomas Subject: Re: bug#69517: [PATCH] Make gnus cache work with group names having '/' In-Reply-To: <87y1a199v5.fsf@gmx.net> (James Thomas's message of "Fri, 29 Mar 2024 05:39:50 +0530") References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> <87v85u5448.fsf@ericabrahamsen.net> <8734sttrxr.fsf@gmx.net> <87zfuzcscp.fsf@dsemy.com> <86h6gqhevr.fsf@gnu.org> <87y1a199v5.fsf@gmx.net> Date: Sat, 30 Mar 2024 15:21:01 -0700 Message-ID: <87jzlj5pki.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69517-done Cc: 69517-done@debbugs.gnu.org, Eli Zaretskii , Daniel Semyonov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 03/29/24 05:39 AM, James Thomas wrote: > Eli Zaretskii wrote: > >> Ping! Is there anything else left to be done here, or should we close >> this? >> >>> From: Daniel Semyonov >>> Cc: 69517@debbugs.gnu.org, Eric Abrahamsen , Eli >>> Zaretskii >>> Date: Fri, 15 Mar 2024 19:33:42 +0200 >>> >>> >>>>> James Thomas writes: >>> >>> > Eric Abrahamsen wrote: >>> >> The real problem (well, one of the real problems) is that we should just >>> >> have two central routines for reading and writing active files, so that >>> >> there are only two places to keep in sync. Instead we have those two >>> >> places, and then a smattering of other functions in other places that do >>> >> something similar, and also have to be kept in sync, and I haven't done >>> >> that. At the very least I'll need to apply your patch from 65467. >>> >> >>> >> The other real problem is that gnus-cache is confused about whether it >>> >> wants to be a select method, or a modified version of article saving. >>> >> The presence of `gnus-use-long-file-name' indicates the latter, but the >>> >> manual's instructions about the nnml select method indicates the former. >>> >> >>> >> I think it should be a select method, which means that the group >>> >> directory should be created in "News/cache" the same way it is created >>> >> at the top level: with the "/" replaced by "_", and everything else >>> >> using the proper "left/right" group name. Perhaps "long file names" can >>> >> still play a role, but if so that should be via >>> >> `nnmail-use-long-file-names', and gnus-cache in general should behave >>> >> like a nnmail backend. >>> >>> > Well, I have sort of, an approach based on my earlier patch: [patch] >>> >>> > James Thomas wrote: >>> >>> >> + (if (not nnmail-use-long-file-names) >>> >> + (nnheader-replace-chars-in-string group ?. ?/) >>> >> + group)) >>> >>> > Since directory names cannot have '/' they used to be replaced by '_' in >>> > group names before conversion. But this makes it impossible, when >>> > generating (non-existent) active files to know whether a '_' in the >>> > directory name was _ or / originally. >>> >>> > The above patch tries a possible solution inspired from [1] but would >>> > break existing users of the cache or agent (xref-find-references >>> > "nnmail-group-pathname") who have groups with % or / in their names. >>> >>> > Seems to work in my limited testing. WDYT? >>> >>> I tested it and it seems to work, but I'm pretty sure it will also break >>> existing groups with % or / in their names in several backends. >>> For example, the `nnmh' and `nndiary' backends use this function to >>> locate groups on disk, which will fail for those groups (unless users >>> rename the files manually). >>> >>> FWIW I think this approach is good, but since Gnus doesn't even emit a >>> warning currently when creating a group with % in its name, I don't >>> think breaking these groups is a good idea. >>> >>> Daniel >>> > > I've been using this since then, on master, with no problems. Let me add > to my earlier reasons for being confident about this not breaking > existing setups: > > James Thomas wrote: > >> I think only one of these combinations is likely to be a problem in >> practice: groups such as [Gmail]/Drafts. I've never seen a % in a >> group name. The cache wouldn't work for one with / anyway (this bug) >> and as far as the agent is concerned, none of the Gmail groups with >> spaces in them work anyway (bug#65467: note that the patch on this is >> also needed for the agent to work on these groups with /). I haven't >> used nnmh or nndiary but I don't think they normally use group names >> with '/'. > > The only ones with '/' (and no spaces) I know of are the Gmail groups, > namely: > > [Gmail]/Bin > [Gmail]/Drafts > [Gmail]/Important > [Gmail]/Spam > [Gmail]/Starred > > ...which are unlikely to be agentized because of their nature (though > ideally the patch at bug#65467 ought to be applied as well, after this). > > Moreover, getting Gmail to work with Gnus requires a paid account and a > complicated setup with OAuth2 (AFAIK, because I use one) which only few > people are likely to have managed. > > Lastly, the fix for such an unlikely existing setup is a simple rename > of the directory: say, from [Gmail]_Drafts to [Gmail]%2FDrafts. Thanks, I've now applied this, and am closing the bug. Sorry this took so long -- I kept thinking I would dive a little deeper into the nnmail file/directory shenanigans and get a better grasp on the internals, but obviously was not finding the time. In it goes! Eric ------------=_1711837322-8779-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 Mar 2024 01:55:21 +0000 Received: from localhost ([127.0.0.1]:39461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgb4T-00016J-BY for submit@debbugs.gnu.org; Sat, 02 Mar 2024 20:55:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:53420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgb4P-000169-K7 for submit@debbugs.gnu.org; Sat, 02 Mar 2024 20:55:20 -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 ) id 1rgb1q-0006fr-N3 for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2024 20:52:38 -0500 Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgb1o-000466-BV for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2024 20:52:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1709430752; x=1710035552; i=jimjoe@gmx.net; bh=4QfQi6DJhgHSlFc5ZRwGSfBge4ooB8GOg9kUIn47qk0=; h=X-UI-Sender-Class:From:To:Subject:Date; b=XpRCNWfnwpVm+UOwcgi5ucvMVkVKvmGAXhtkZv9reeS0hQBDyuFEXsEGa6pxNpFB G0vqjM3lqnAlrmi4AN0S13u7Whe572GvMurECBqx5+k8ugB7vZmlNYcfgHUQ0D8Nw wALaLY1qZP1wUp8dfWf6Ig5YqsmF1oKp71lA9zRnVj0KSC6u6BftpQQxKMsKfwiRP YjSK++8STdFmOUn/Al3W1x4HNGNv+tBOj+6Eta2tCnYO2a2/9grZ8kjvMqCx2nmm0 qx88gHbJruHDm1W9e7eQuBSq92A+cxBcttF5MpFuAxEbqxR+4rTpnidkvUrnogdhx BWxxMxQ23NV+CmHNGw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from user-Inspiron-15-5518 ([117.216.28.216]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N4z6q-1qhvIp1xOm-010sxn for ; Sun, 03 Mar 2024 02:52:32 +0100 From: James Thomas To: bug-gnu-emacs@gnu.org Subject: [PATCH] Make gnus cache work with group names having '/' Date: Sun, 03 Mar 2024 07:22:29 +0530 Message-ID: <87wmqkcc9u.fsf@outlook.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:Osg1nzyGPB4kLGJ6wirOTUoynJPZ4A/bCqChgDcrJOjnlzLCHZY B5KMDJpZkwyTCjhEqwE6e7440oh4FwuhFQ7FxN6qGY9JegJ4zcrGxc48gOkqmIFdWE1vhhy JpJqW6hAr26bzYmt7RkFc5bdx0E3eVIpKEjhRpCqU7bdxlKxXh1eK7AsDBPvRFkBFJsvAKn HtlrAIJPe7IHj6JMYEb4A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:zDbFYntSF/A=;m+RDA4OQLb+3r7NFptNSAqP9OzH VhqFOgdCH8rKdRVq+S+k76tTA6grX9ruNd9/jQbEJzzzCUc+FttPuAdzAF/nnmSqvfVdRFZLg DS+9CkbwktUv6H/O3juYtdbXicj1diupTlkDkAb4M0jLQFx5kV694500rM0UWxEZ+jiFArzWg +d6gNO8aeFoWTou8e+Zft09TCY7W/nZP/Rw3La1VBqQeZGvmFjfC0Necac9UDXIKZwOZ6gWEm vRJCxyRfBHqCiO85f77ewZYdfzG4EvZBrbwfqAk58ODVr+puHj8zD3LPTJbCJIqNhp9Bj7/EY gq4nCnTt0F8Vm9FDk5hl/v5Z0A2kpIfE552mP+ZMj7XzWMsBCv59fe77lBNxMSKya9uBujrQZ cCd6g/OGnxguwTSS+gxpBoyF7/SjXJ7M3eVxQyawPAPEN0UAIcssEQjApKoDJFxL02rKtkOly AjcnJu/6Rs5EEaWv4Po+NfwZewYIDmfoFiY5v79cj3uLkCmeAxdcfjzSzyCDnggbhvAr/hQ+5 Vf9Ke6jQF11PaAbudgseX1t0ho90LD5YCTEPWyd89lSfMGM42E8aH44p19lGk415xm+WDjrta 9/WMmHXsETHWUHB1sAaYEHOq27ue5hogaKArgELMsaA9sOesEP+iGH08cadBZwbgvR0aycYnI leKD2q2ni1JODmQxFu+FQsWqvV8OzHih4LfUuJaaEqOVkTPYaW/7bREAHCz3/mcOhG8s/43jw fi+2GIN8cos5astxSuK+0IKqhDZN1KupKfySfl3PJ+2PQuvuqfA1OwCoh4RjAHcGmelG8AXGJ qbzghrcVx8FWjvmu5T/cQH+Lkjnsyl7L1km55Eo0kTKiQ= Received-SPF: pass client-ip=212.227.17.22; envelope-from=jimjoe@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Reproduction steps: - Setup Gnus with any group name having a slash ('/') such as "[Gmail]/Drafts" or an Atom feed (they usually have slashes) using the patch in bug#66188. - Press '*' on a message in the group. - Do (info "(gnus) Creating a Virtual Server") - Open the above from the Server buffer; RET on the new group fails. A patch is attached. I couldn't find the problematic commit or its original branch (where it was a consolidated merge from) but 'gnus-use-long-file-names' is apparently not meant for backends: it can't even be customized with that 'not-cache' option. I think this is the right way to solve it: the other lines removed in this patch are even older, but they were never being called due to the above reason. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-02-20 built on user-Inspiron-15-5518 Repository revision: 466800591c2bd674b0b967205147d7519da7e1a4 Repository branch: nnatom-master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Ubuntu 22.04.3 LTS --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Make-gnus-cache-work-with-group-names-having.patch Content-Transfer-Encoding: quoted-printable =46rom e0b4a71bf241d6faaa46bea58a4688f1e9c932b8 Mon Sep 17 00:00:00 2001 From: James Thomas Date: Sun, 3 Mar 2024 06:58:49 +0530 Subject: [PATCH] Make gnus cache work with group names having '/' Replace the incorrect `gnus-use-long-file-name` with `nnmail-use-long-file-names`. * lisp/gnus/gnus-cache.el (gnus-cache-file-name): =2D-- lisp/gnus/gnus-cache.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 961219eee8f..d174ee9a9f4 100644 =2D-- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -448,16 +448,12 @@ gnus-cache-file-name (file-name-as-directory (expand-file-name (nnheader-translate-file-chars - (if (gnus-use-long-file-name 'not-cache) - group - (let ((group (nnheader-replace-duplicate-chars-in-string - (nnheader-replace-chars-in-string group ?/ ?_) - ?. ?_))) - ;; Translate the first colon into a slash. - (when (string-match ":" group) - (setq group (concat (substring group 0 (match-beginning 0)) - "/" (substring group (match-end 0))))) - (nnheader-replace-chars-in-string group ?. ?/))) + (let ((group (nnheader-replace-duplicate-chars-in-string + (nnheader-replace-chars-in-string group ?/ ?_) + ?. ?_))) + (if (not nnmail-use-long-file-names) + (nnheader-replace-chars-in-string group ?. ?/) + group)) t) gnus-cache-directory)))) =2D- 2.34.1 --=-=-= Content-Type: text/plain -- --=-=-=-- ------------=_1711837322-8779-1--