Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Fernando de Morais <fernandodemorais.jf@gmail.com>
Cc: info-gnus-english@gnu.org
Subject: Re: Help needed: nnmaildir and expire-group parameter.
Date: Wed, 30 Nov 2022 09:16:39 -0800	[thread overview]
Message-ID: <87o7soz7k8.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87wn7dzal4.fsf@gmail.com> (Fernando de Morais's message of "Tue,  29 Nov 2022 18:59:03 -0300")

Fernando de Morais <fernandodemorais.jf@gmail.com> writes:

> Hello Eric,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Look for the value of "pgname", and the 'expire-age parameter, and
>> later the 'expire-group parameter. Something in there should jump out
>> at you as "wrong".
>
> This was a very wise advice: in the end, `nnmaildir' was looking for the
> parameters of the group "inbox", not "nnmaildir:inbox".  That did the
> trick!  🎉

[...]

> Thank you very much!

Glad it wasn't any harder to resolve!

> *P.S.:* I imagine there must be a rationale behind this and it was
> defined a long time ago, but why doesn't `nnmaildir' make use of the
> `expiry-target' parameter like other backends do?

Apparently it's not using the same parameter names as everyone else,
because nnmaildir lets the user put arbitrary Lisp expressions in as
values -- it runs the values through `eval' at Gnus startup time. I
think the idea is that, because the parameter values are handled
differently, the parameter names should be different.

This doesn't particularly make sense, and the use of `eval' in regular
code is pretty heavily discouraged these days. This code seems to have
been in nnmaildir.el since The Dawn of Time, and I'm sure that at one
point someone depended heavily on being able to `eval' their parameter
values.

It would be relatively simple to fix: we could leave the existing
handling of nnmaildir's own parameters in place, but also start
retrieving the normal expiry parameters, using Gnus' regular
`gnus-group-parameter-*' functions.

Eric


  reply	other threads:[~2022-11-30 17:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-26 22:11 Fernando de Morais
2022-11-29 19:17 ` Eric Abrahamsen
2022-11-29 19:21   ` Emanuel Berg
2022-11-29 21:59   ` Fernando de Morais
2022-11-30 17:16     ` Eric Abrahamsen [this message]
2022-11-30 18:19       ` Fernando de Morais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7soz7k8.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=fernandodemorais.jf@gmail.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).