From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/17851 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.user Subject: Re: multi-email gnus setup questions Date: Fri, 25 Dec 2015 10:11:39 +0800 Message-ID: <8737uruvj8.fsf@ericabrahamsen.net> References: <87mvt3ny9x.fsf@jnanam.net> <87fuyvmgw1.fsf@ericabrahamsen.net> <8760zpxvr8.fsf@kloecker.org> <87d1twonfv.fsf@jnanam.net> <877fk4xsp3.fsf@ericabrahamsen.net> <87bn9fbkye.fsf@jnanam.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1451009528 19914 80.91.229.3 (25 Dec 2015 02:12:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Dec 2015 02:12:08 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Fri Dec 25 03:11:59 2015 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aCHrK-00021z-1N for gegu-info-gnus-english@m.gmane.org; Fri, 25 Dec 2015 03:11:58 +0100 Original-Received: from localhost ([::1]:33963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCHrJ-0003HA-3h for gegu-info-gnus-english@m.gmane.org; Thu, 24 Dec 2015 21:11:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCHrG-0003Ex-Ke for info-gnus-english@gnu.org; Thu, 24 Dec 2015 21:11:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCHrD-0003WE-F3 for info-gnus-english@gnu.org; Thu, 24 Dec 2015 21:11:54 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:38793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCHrD-0003W0-7w for info-gnus-english@gnu.org; Thu, 24 Dec 2015 21:11:51 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aCHrB-0001oU-5h for info-gnus-english@gnu.org; Fri, 25 Dec 2015 03:11:49 +0100 Original-Received: from 111.197.157.87 ([111.197.157.87]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Dec 2015 03:11:49 +0100 Original-Received: from eric by 111.197.157.87 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Dec 2015 03:11:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 63 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.197.157.87 User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:O1BeUEukMY+l4L+sL61jz4cQX2I= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:17851 Archived-At: Benjamin Slade writes: > Eric Abrahamsen writes: >> `nnmail-expiry-targets' isn't a server variable, just a regular >> variable. Also, there's no `nnimap-expiry-targets', and >> `nnmail-fancy-expiry-targets' only lets you base expiration on group >> names, not backends. Here's what I do (outside of the server >> definition): >> >> (setq nnmail-expiry-target 'my-expire-gmail-imap-message) >> >> (defun my-expire-gmail-imap-message (group) >> "In gmail-based imap groups, expiry should happen by moving the >> message to the corresponding [Gmail]/Trash folder." >> (if (string-match "nnimap\\+\\(several\\|gmail\\|backends\\):" group) >> (format "nnimap+%s:[Gmail]/Trash" (match-string 1 group)) >> 'delete)) >> >> That expires everything in a Gmail imap account to the corresponding >> [Gmail]/Trash folder. > > Hmm.. ok, so outside of the server definition, just in the main .gnus.el > fail (not in the scope of anything else), I've tried putting: > > (setq nnmail-expiry-target 'my-expire-gmail-imap-message) > (defun my-expire-gmail-imap-message (group) > "In gmail-based imap groups, expiry should happen by moving the > message to the corresponding [Gmail]/Bin folder." > (if (string-match "nnimap\\+\\(homemail\\|workmail\\|funmail\\):" group) > (format "nnimap+%s:[Gmail]\Bin" (match-string 1 group)) > 'delete)) > > [So in my Gnus groups, I see things like: > > 3:nnimap+homemail:INBOX > 7:nnimap+homemail:Madness > 9:nnimap+workmail:INBOX > > etc. > > And my Gmail boxes are [Gmail]/Bin rather than [Gmail]/Trash] > > The resulting behaviour, when I open up the Gmail webclient, that the > deleted message indeed disappears from the Inbox, but does not appear in > the [Gmail]/Bin directory. (I.e., as far as I can, it must just be > matching the 'delete rule). > > I've also tried setting (setq nnmail-expiry-wait 'immediate), but that > doesn't seem to make a difference. > > Finally, I also tried changing the regex to: > > nnimap\\+\\(homemail\\|workmail\\|funmail\\):.* > > but that also doesn't work. > > Any ideas where something could be going wrong? I think it's probably edebug time. Try instrumenting the my-expire-gmail-imap-message function, and maybe, for good measure, gnus-group-expire-articles-1 as well. Expire some articles, and step through the functions, and just see what's going on. My guess is it will become clear pretty quickly what's going wrong. I hope!