From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70994: [PATCH] Make cache regeneration work in group names with / Date: Sat, 24 Aug 2024 11:25:05 +0300 Message-ID: <86plpynx9a.fsf@gnu.org> References: <86jzjt11ff.fsf@outlook.com> <87le428xvg.fsf@ericabrahamsen.net> <86y182bg9t.fsf@gmx.net> <87zfsg6lut.fsf@ericabrahamsen.net> <865xsbu83j.fsf@outlook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8675"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70994@debbugs.gnu.org, stefankangas@gmail.com, daniel@dsemy.com To: eric@ericabrahamsen.net, James Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 24 10:26:31 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 1shm6Q-00026m-8n for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Aug 2024 10:26:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shm6C-0000Ui-3i; Sat, 24 Aug 2024 04:26:16 -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 1shm6A-0000U2-70 for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 04:26:14 -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 1shm69-00069j-Tr for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 04:26:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=tRSjOriUT+ZwABQ3KZdsNhowTjJJlhzYM20E+11hFss=; b=Nv6ABUuu7hl28KB5tJPwDa034BB2Jb7ZfBvMMEI1uPTZeDvEz2PaldytuugeXMpknAmrDPFnFltGRVY+3HEQ/5WUTNLptZGcHdG9oxx8ia9XiyJ1HCieQVsJughHTKCWFmVMpQVRpGO17K4I0n85CpWrKouhiBw1xZpLDXQqYPf2aT34MG4X8ox8PCR330n56r6mPsSrUal3oR1sRSCb3RjNhZ2A4iWO0PSIzENEFNGJxtJI49ECIMIYl96fJ13w9eU0izYxRKMqLnZ3Ajool+H4YdZYEwcaud1VEXP+21wlh3+diSwEVTKYzKesyVukVLPqeXTwaFqdJNbTjRfV5g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1shm6w-0006rd-2U for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 04:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Aug 2024 08:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70994-submit@debbugs.gnu.org id=B70994.172448796626313 (code B ref 70994); Sat, 24 Aug 2024 08:27:02 +0000 Original-Received: (at 70994) by debbugs.gnu.org; 24 Aug 2024 08:26:06 +0000 Original-Received: from localhost ([127.0.0.1]:40396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shm61-0006qK-H6 for submit@debbugs.gnu.org; Sat, 24 Aug 2024 04:26:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:32814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shm5z-0006pr-Je for 70994@debbugs.gnu.org; Sat, 24 Aug 2024 04:26:04 -0400 Original-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 1shm56-0005pu-Qk; Sat, 24 Aug 2024 04:25:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=tRSjOriUT+ZwABQ3KZdsNhowTjJJlhzYM20E+11hFss=; b=Ec7zXEhxjHkfrg2xo926 p7JnkWbKHeHCSrzp66Ckyl7x/H+emr8SU0Fd4CznGj252x6ciAWVLSCw8D44lfgc+4BxobJFVRUmU C0NgD9tiYF+KdvTulkB3uwae9kxK/yNvdK/OuGu+I2/kJUySaZRg7NkUha2Eo8Bbk/3i8nPY0CX8l 89b0by9awrNalTzPDtsMfk4aNpnoIbfjY6UPoiZzfCnKGORWLfOWppEjti5PCITsD/OKRINovVxUa iiEYhOqLkbWlkEz6aecRT90IZFxHa9HDV3mwkM0pEPAWBnZo1TBAfRP62Yye3PNaZ470bDk8GGmFX L6Z6vi5wtgqKmw==; In-Reply-To: <865xsbu83j.fsf@outlook.com> (bug-gnu-emacs@gnu.org) 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:290635 Archived-At: Ping! Can we make some progress here? > Cc: 70994@debbugs.gnu.org, Stefan Kangas , > Daniel Semyonov > Date: Thu, 08 Aug 2024 06:46:48 +0530 > From: James Thomas via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Eric Abrahamsen wrote: > > > James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of > > text editors" writes: > > > >> Eric Abrahamsen wrote: > >> > >>> Stefan Kangas writes: > >>> > >>>> James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of > >>>> text editors" writes: > >>>> > >>>>> Reproduction steps for bug: > >>>>> > >>>>> - emacs -Q > >>>>> - (setq gnus-secondary-select-methods > >>>>> '((nnatom "github.com/vedang/pdf-tools/commits.atom"))) > >>>>> (setq gnus-select-method '(nnnil "")) > >>>>> - M-x gnus > >>>>> - Open a message in the new group and press * > >>>>> - Add the cache virtual server (info "(gnus) Creating a Virtual Server") > >>>>> - ^ (server buffer) and: g on the cache > >>>>> - RET to open (fails) > >>>>> > >>>>> This is a possible fix that I've tested only on my (limited) setup, for > >>>>> now: > >>>> > >>>> Eric, what do you think of the below patch? > >>> > >>> Thanks for the bump... > >>> > >>> James, wasn't this what bug#69517 was supposed to be fixing? > >> > >> You're right, but that was specifically the 'cache'. In regenerate, all > >> it sees is that the backend is nnml and there's nothing else special > >> about the server. > > > > Okay, thanks. > > > >>> I'm still feeling like we're patching pinhole leaks in a fundamentally > >>> broken system. > >> > >> Sorry if my patch made you think so, but I don't feel that way 🙂. This > >> feature is just tangential and things like slashes in group names are > >> bound to complicate things. > > > > I wasn't complaining about your code :) Just generally grumbling that > > this is so complex. > > > >> But let me see if I can whip up an alternative patch that does things in > >> a simpler way (I did say: 'possible' patch). One thing to decide is > >> whether '%'s are uncommon enough in group names to warrant special > >> treatment in a backend as fundamental as nnml. > > I've gone ahead and assumed the above; so now the patch is way simpler. > (Btw I meant to say 'nnmail' above, not 'nnml'). It shouldn't be a > problem: think I remember only Gmail using a % at some point - and a > simple renaming fixes that - perhaps there should be a NEWS entry. > > > Note that for this to work with nnatom in the current upstream you'll > also need (ahem!) my patch in bug#65467: bug#71888 must be responsible. > > > Without diving into this right now, it seems like this is something that > > should be governed by the nnmail abstract backend, from which nnml and > > friends inherit. I would dearly, dearly love it if all backends that > > might potentially create an on-disk directory from a group name would > > use the same code (applying the same user options) to do it, essentially > > transparently. It makes me nervous when various functions in various > > places repeat similar-but-not-quite-identical routines in encoding and > > decoding group names. I suppose that URL encoding/decoding functions > > might end up being an okay tool, but I wonder if Elisp doesn't already > > have some prior art here. I'll do a bit of reading. > > That's worthwhile of course, but here, for the time being, I've decided > I'm only grappling with the new allowance of '/'s in group names. :-) > > (A further improvement involves replacing the '/'s in the code with > '-directory-separator-character', but that's for another report) > > Regards, > James