Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org (W. Greenhouse)
To: info-gnus-english-mXXj517/zsQ@public.gmane.org
Subject: Re: How to deal with "Archive" and "delete" in gmail?
Date: Thu, 04 Apr 2013 14:37:28 +0000	[thread overview]
Message-ID: <874nfmgy53.fsf@riseup.net> (raw)
In-Reply-To: <874nfmsonl.fsf@krugs.de>

Hi Rainer,

Rainer-vfylz/Ys1k4@public.gmane.org (Rainer M. Krug) writes:

> This looks like a good option. But I am still struggling with the regexp
> for groups (maybe because I do not understand the naming of groups?).
>
> So I have my gmail account defined as primary source:
>
> (setq gnus-select-method 
>                '(nnimap "gmail"
>                         (nnimap-address "imap.gmail.com")
>                         (nnimap-server-port 993)
>                         (nnimap-stream ssl)
>                         (nnimap-authinfo-file "~/.authinfo.gpg")
>                         (nnmail-expiry-target "[Gmail]/Bin")
>                         (nnmail-expiry-wait 2)))
>   
> and I would like to set the default move target for all groups in this
> primary source to "[gmail]/All Mail":
>
> (setq gnus-move-split-methods
>         '(("nnimap.*" "[gmail]/All Mail")))
>
> but it is not working. 
>
> I assume it is something wrong with the regexp "nnimap.*" - my reasoning
> was: match all groups which start with nnimap.
>
> This regexp also concerns other configuratios which are not working...
>
> Any suggestions?
>
> Thanks,
>
> Rainer

From the config you posted here, it looks like all your Gmail mailboxes
are so-called "native groups."  "Native groups" are those which use
`gnus-select-method' as opposed to one of the secondary select methods
or a "foreign" server.  All this "native" vs. "foreign" is perhaps all
making Gnus sound rather ethnocentric, but the gist of it is that
"native groups" do not have the server type prepended to their names.
That is, because Gmail is your primary select method, Gmail groups on
your system simply have names like "INBOX" or "[Gmail]/Important", and
not names like "nnimap+imap.gmail.com:INBOX".  So that's why your
regexes went astray.

`gnus-move-split-methods' and `gnus-split-methods' and similar such
rules in Gnus are applied such that more specific rules can override
more general ones.  If you are primarily using Gnus as a Gmail client,
it might make a lot of sense to have the most general rule direct any
re-filed message to the Gmail archive, and then make exceptions to this
later on.  So, perhaps try this:

(setq gnus-move-split-methods
      '((".*" "[Gmail]/All Mail")))

Good luck!
Best,
Will

-- 
BOFH excuse #432:

Borg nanites have infested the server

  reply	other threads:[~2013-04-04 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 11:04 Rainer M. Krug
2013-04-03 14:57 ` W. Greenhouse
2013-04-04  8:09   ` Rainer M. Krug
2013-04-04 14:37     ` W. Greenhouse [this message]
2013-04-05  8:46       ` Rainer M. Krug
     [not found] <mailman.23374.1364987079.855.info-gnus-english@gnu.org>
2013-04-03 14:33 ` Cor
2013-04-04  8:12   ` Rainer M. Krug
     [not found]   ` <mailman.23488.1365063160.855.info-gnus-english@gnu.org>
2013-04-04 11:52     ` Cor

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=874nfmgy53.fsf@riseup.net \
    --to=wgreenhouse-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
    --cc=info-gnus-english-mXXj517/zsQ@public.gmane.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).