From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69517: [PATCH] Make gnus cache work with group names having '/' Date: Mon, 11 Mar 2024 03:02:01 +0530 Message-ID: <87ttldu626.fsf@gmx.net> References: <87wmqkcc9u.fsf@outlook.com> <86wmqbyews.fsf@gnu.org> <8734szul14.fsf@gmx.net> <874jde7j2c.fsf@ericabrahamsen.net> Reply-To: James Thomas Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eric Abrahamsen , Eli Zaretskii To: 69517@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 10 22:32:55 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rjQmt-0009QI-3s for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Mar 2024 22:32:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjQmW-0007hH-63; Sun, 10 Mar 2024 17:32:32 -0400 Original-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 1rjQmT-0007h4-DD for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 17:32:29 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjQmT-0006sL-5A for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 17:32:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rjQn0-0005k4-7e for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 17:33:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 69517-submit@debbugs.gnu.org id=B69517.171010637922059 (code B ref 69517); Sun, 10 Mar 2024 21:33:02 +0000 Original-Received: (at 69517) by debbugs.gnu.org; 10 Mar 2024 21:32:59 +0000 Original-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 Original-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 Original-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 In-Reply-To: <874jde7j2c.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 09 Mar 2024 21:27:23 -0800") X-Provags-ID: V03:K1:6JrNt7Z76yhkQgyvoEcFSglJEdr6mYrI+LJ9ONyh+zdB5VtqGho aWrd6dKuQ5FYcrKfy4h+VfmZAY6q4a75O/rQk/l6GQcjw+VhANYmf6rvcDcJAziJsl8Tchu MGOWqa/xjx+9x0tmKV7Ubo/NOzM/pJVqYPn3Hqu4Z8zr+k6M82q38thsBFS2SKcU4Pw1cVu mi5oWEEeJgyPLeuh5zWTg== 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+RiUVxBOV X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281442 Archived-At: (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