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, 07 Sep 2024 10:23:53 +0300 Message-ID: <86le04yliu.fsf@gnu.org> References: <86jzjt11ff.fsf@outlook.com> <87le428xvg.fsf@ericabrahamsen.net> <86y182bg9t.fsf@gmx.net> <87zfsg6lut.fsf@ericabrahamsen.net> <865xsbu83j.fsf@outlook.com> <86plpynx9a.fsf@gnu.org> <86le0mb7eb.fsf@gmx.net> 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="14344"; 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 Sep 07 09:25:07 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 1smpog-0003bm-Tr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Sep 2024 09:25:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smpoc-0008TW-UP; Sat, 07 Sep 2024 03:25:02 -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 1smpob-0008Sx-Ff for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 03:25:01 -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 1smpob-0005vi-68 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 03:25:01 -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=hB4tvvgoOOv5eD9BEk1HveI4LApfaGPlBVunS6OvGJU=; b=oJoIjO/ngPQOGr5oTbAQ011bATsLGQg4D/yvIIRaqmMQBFE0MV42anjAeTTipfCBwVzpWPdEAizVYPcasA5Y/nLkIlJSZ03ApwiJpr4FGoN91W+2kg90WoldOmWOJd6vTjVzodjvOYUcehgOBwuZuZUoyyUd0oZc1FmJCM/ynVl2dA6yhpt/zgb2SwaeQ0GhQ3GenMO9o35dHoUP+MU7xef2F00Vd1kWqrTqJCI2zaBNGQFz2O6DYoy3mTbi4ikRK/PniGYy1tV/gLHqrzgu06Kj4ggszR65QXfT5YfAKJF1YcKG2+AY/8mFHB01Om9hN3y7/8TH9jUK+r2P3AKlNQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smpob-0000fU-JM for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 03:25:01 -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, 07 Sep 2024 07:25:01 +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.17256938442476 (code B ref 70994); Sat, 07 Sep 2024 07:25:01 +0000 Original-Received: (at 70994) by debbugs.gnu.org; 7 Sep 2024 07:24:04 +0000 Original-Received: from localhost ([127.0.0.1]:54660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smpng-0000dn-0j for submit@debbugs.gnu.org; Sat, 07 Sep 2024 03:24:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smpnd-0000dG-OQ for 70994@debbugs.gnu.org; Sat, 07 Sep 2024 03:24:02 -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 1smpnX-0005pu-9I; Sat, 07 Sep 2024 03:23:55 -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=hB4tvvgoOOv5eD9BEk1HveI4LApfaGPlBVunS6OvGJU=; b=NG+NRfCeRF9Jyn0VhJak uu5eirt71apbrBBskFHB0tgGt6cNCe4xs2YIBjyBZp0dlPRY6LvbjxN5AgG4zs0y+yyE/YRBVjSHr QUJem97GnUkT3hugTmw0/TLktnbJFfSoG2A33l2K8ZKbcRt0eWJBEoeU7XsF4BGelmq6M3y31iALJ /czq495Kf1b5kcVGlWcg4WujwoO4lIabv7dJuSZZMOlzJ0Ojb5t8hH4ddYDPfPw/ZD6D1ohbxx9UA i25Rc+aukWyOxXhEzEyDr/0ObmoEGJGguA+imLXvGiQK2Xh5yRLGR4y0F4xIqGWZ5nEi7wyC5PJU5 OBAuYPezVufAjA==; In-Reply-To: <86le0mb7eb.fsf@gmx.net> (message from James Thomas on Sat, 24 Aug 2024 14:54:28 +0530) 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:291352 Archived-At: Ping! Eric, any further comments, or should we install the patch? > From: James Thomas > Cc: eric@ericabrahamsen.net, 70994@debbugs.gnu.org, > stefankangas@gmail.com, daniel@dsemy.com > Date: Sat, 24 Aug 2024 14:54:28 +0530 > > Eli Zaretskii wrote: > > > Ping! Can we make some progress here? > > I'd like to confess again that this doesn't seem to be a big deal: > 'gnus-cache-generate-nov-databases' and 'gnus-cache-generate-active' > should work regardless. It's only for someone who might accidentally do > this. > > Regards, > James > > > >> 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 >