Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: info-gnus-english@gnu.org
Subject: Re: Split mail
Date: Sun, 27 Feb 2022 08:17:40 -0800	[thread overview]
Message-ID: <87ilt0i8rf.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <865yp5nr5n.fsf@gmail.com>

Edouard Debry <edouard.debry@gmail.com> writes:

> Hello,
>
> I try to split my mail with gnus, without much success at the moment.
>
> Here is the relevant configuration section :
>
>
> <========================================================================>
> (setq gnus-select-method '(nnnil ""))
>
> (setq gnus-secondary-select-methods
>           '((nntp "gmane" (nntp-address "news.gmane.io"))
>             (nnimap "gmail"
>                     (nnimap-inbox "nnimap+gmail:INBOX")
> 	                (nnimap-address "imap.gmail.com")
> 	                (nnimap-server-port "imaps")
>                     (nnir-search-engine imap)
> 	                (nnimap-stream ssl)
>                     (nnimap-authinfo-file "~/.authinfo.gpg")
>                     (nnmail-expiry-target "nnimap+gmail:[Gmail]/Corbeille")
>                     (nnmail-expiry-wait 'immediate)
>                     (nnimap-split-predicate "UNDELETED")
>                     (nnimap-split-fancy
>                      '(|
>                        (to ".*emacs-orgmode@gnu.org" "orgmode")
>                        "nnimap+gmail:INBOX"))
>                     (nnimap-split-methods 'nnimap-split-fancy)
>                     )))
> <========================================================================>
>
> As far as I understand, this should create a gnus group "orgmode" in
> which gnus would move all received mails which Cc to
> emacs-orgmode@gnu.org, because "to" searches both "To" and "Cc" fields.
>
> But nothing so far happens.
>
> If I change (nnimap-inbox "nnimap+gmail:INBOX") into (nnimap-inbox
> "INBOX") and, 
>
> (nnimap-split-fancy
>  '(
>    (to ".*emacs-orgmode@gnu.org" "orgmode")
>     "nnimap+gmail:INBOX"))
>
> into 
> (nnimap-split-fancy
>  '(
>    (to ".*emacs-orgmode@gnu.org" "orgmode")
>     "INBOX"))
>
> then, I get the error :
>
> Error in ‘nnmail-split-methods’; using ‘bogus’ mail group: (wrong-type-argument arrayp (| (to ".*emacs-orgmode@gnu.org" "nnimap+gmail:orgmode") "INBOX")) [39 times]

Your entire select method config is already quoted, so there's no need
to additionally quote the value of `nnimap-split-methods' or
`nnimap-split-fancy'. And yes, the inbox should be a plain (unprefixed)
group name.

(Also, is there actually a `nnimap-authinfo-file' variable? What version
of Emacs/Gnus are you using?)



  reply	other threads:[~2022-02-27 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 22:40 Edouard Debry
2022-02-27 16:17 ` Eric Abrahamsen [this message]
2022-03-02 22:21   ` Edouard Debry

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=87ilt0i8rf.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).