Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* multi-email gnus setup questions
@ 2015-12-22  0:05 Benjamin Slade
  2015-12-22  1:06 ` Eric Abrahamsen
  0 siblings, 1 reply; 14+ messages in thread
From: Benjamin Slade @ 2015-12-22  0:05 UTC (permalink / raw)
  To: info-gnus-english

A few issues I'm stuck on. Partially owing to using multiple accounts,
perhaps.

(1) Splitting mail with multiple accounts.
I have this in my .gnus.el:

;; mail splitting
(setq nnimap-split-inbox "INBOX")
 (setq nnimap-split-predicate "UNDELETED")
 (setq nnmail-split-fancy ;; 
       '(|                                ;;
         (: gnus-registry-split-fancy-with-parent) ;;
	 ("List-Id" ".*help-gnu-emacs.gnu.org" "INBOX.emacs.help")
	 (to "someone@domain.net" "INBOX.someone")
         "INBOX"                          ;; 
        ))
 (setq nnimap-split-rule 'nnmail-split-fancy)
 (setq nnmail-split-methods 'nnimap-split-fancy) ;; 
 (gnus-registry-initialize) ;;

But it doesn't seem to create new folders/groups for either rule.  What
am I doing wrong?  Is it an issue of having multiple accounts?

(2) Splitting mail with Gmail/other apps:
Assuming I can successfully split mail, if I split into something like
INBOX.emacs, will other connecting non-gnus mail clients see mail in
INBOX.emacs as being in the INBOX?

(3) Customizing the C-x gnus menu:
Right I see things like nnimap+gmail1account:INBOX. Is there a way to
customize this, to look like FirstAccount:INBOX ?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-22  0:05 multi-email gnus setup questions Benjamin Slade
@ 2015-12-22  1:06 ` Eric Abrahamsen
  2015-12-22 21:15   ` Benjamin Slade
       [not found]   ` <mailman.430.1450858810.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Eric Abrahamsen @ 2015-12-22  1:06 UTC (permalink / raw)
  To: info-gnus-english

Benjamin Slade <slade@jnanam.net> writes:

> A few issues I'm stuck on. Partially owing to using multiple accounts,
> perhaps.
>
> (1) Splitting mail with multiple accounts.
> I have this in my .gnus.el:
>
> ;; mail splitting
> (setq nnimap-split-inbox "INBOX")
>  (setq nnimap-split-predicate "UNDELETED")
>  (setq nnmail-split-fancy ;; 
>        '(|                                ;;
>          (: gnus-registry-split-fancy-with-parent) ;;
> 	 ("List-Id" ".*help-gnu-emacs.gnu.org" "INBOX.emacs.help")
> 	 (to "someone@domain.net" "INBOX.someone")
>          "INBOX"                          ;; 
>         ))
>  (setq nnimap-split-rule 'nnmail-split-fancy)
>  (setq nnmail-split-methods 'nnimap-split-fancy) ;; 
>  (gnus-registry-initialize) ;;
>
> But it doesn't seem to create new folders/groups for either rule.  What
> am I doing wrong?  Is it an issue of having multiple accounts?

You have to tell each account to use your split rules (this allows you
to theoretically use different rules for different accounts). See
the "Client-side IMAP Splitting" section of the manual for details. If
you're using fancy splitting, I think you have to set
nnimap-split-methods to nnimap-split-fancy, then set nnimap-split-fancy
to the value of the splits you want to use. All that has to happen as
server parameters.

> (2) Splitting mail with Gmail/other apps:
> Assuming I can successfully split mail, if I split into something like
> INBOX.emacs, will other connecting non-gnus mail clients see mail in
> INBOX.emacs as being in the INBOX?

I'm actually not sure about this.

> (3) Customizing the C-x gnus menu:
> Right I see things like nnimap+gmail1account:INBOX. Is there a way to
> customize this, to look like FirstAccount:INBOX ?

You can customize how the line for each group appears using the
`gnus-group-line-format' variable -- it's possible to remove the backend
altogether. See the "Group Line Specification" part of the manual. In
particular, you might try switching the %g format specifier for %G?
Anyway, experiment with that!



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-22  1:06 ` Eric Abrahamsen
@ 2015-12-22 21:15   ` Benjamin Slade
       [not found]   ` <mailman.430.1450858810.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Benjamin Slade @ 2015-12-22 21:15 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> You have to tell each account to use your split rules (this allows you
> to theoretically use different rules for different accounts). See
> the "Client-side IMAP Splitting" section of the manual for details. If
> you're using fancy splitting, I think you have to set
> nnimap-split-methods to nnimap-split-fancy, then set nnimap-split-fancy
> to the value of the splits you want to use. All that has to happen as
> server parameters.

I've checked "Client-side IMAP Splitting" in the Gnus manual, and tried
a few different things, but nothing seems to work. (I don't get any
error messages either, but nothing gets refiled.)

Does anyone have an example setup with multiple IMAP accounts and mail
splitting? 

>> (3) Customizing the C-x gnus menu:
>> Right I see things like nnimap+gmail1account:INBOX. Is there a way to
>> customize this, to look like FirstAccount:INBOX ?
>
> You can customize how the line for each group appears using the
> `gnus-group-line-format' variable -- it's possible to remove the backend
> altogether. See the "Group Line Specification" part of the manual. In
> particular, you might try switching the %g format specifier for %G?
> Anyway, experiment with that!

I think I'll have to write a custom function to chop off the beginning
bit since one of the default formatting specifiers shows too much and
the other shows too little.

-- 
( Dr Benjamin Slade . b.slade@utah.edu . http://www.jnanam.net/slade )
 ( Linguistics . University of Utah )
   (pgp_fingerprint: (21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
         '(sent by Gnus on Emacs running under GNU/Linux)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
       [not found]   ` <mailman.430.1450858810.843.info-gnus-english@gnu.org>
@ 2015-12-23 11:14     ` Jens Klöcker
  2015-12-23 21:38       ` Benjamin Slade
  2015-12-24  3:28       ` Eric Abrahamsen
  0 siblings, 2 replies; 14+ messages in thread
From: Jens Klöcker @ 2015-12-23 11:14 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 2727 bytes --]

Hi Benjamin,

Am 22.12.2015 um 22:15 Uhr schrieb Benjamin Slade:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>> You have to tell each account to use your split rules (this allows
>> you to theoretically use different rules for different accounts). See
>> the "Client-side IMAP Splitting" section of the manual for
>> details. If you're using fancy splitting, I think you have to set
>> nnimap-split-methods to nnimap-split-fancy, then set
>> nnimap-split-fancy to the value of the splits you want to use. All
>> that has to happen as server parameters.
>
> I've checked "Client-side IMAP Splitting" in the Gnus manual, and
> tried a few different things, but nothing seems to work. (I don't get
> any error messages either, but nothing gets refiled.)
>
> Does anyone have an example setup with multiple IMAP accounts and mail
> splitting? 

I have one. It's looking like this:

--8<---------------cut here---------------start------------->8---
(setq gnus-secondary-select-methods
      '((nnimap "work"
                SOME CONFIG OPTIONS
                (nnimap-inbox "INBOX")
                (nnimap-split-methods 'nnimap-split-fancy)
                (nnimap-split-fancy
                 (| SOME FANCY RULES HERE
                  )
                 )
                )
        (nnimap "private"
                SOME CONFIG OPTIONS
                (nnimap-inbox "INBOX")
                (nnimap-split-methods 'nnimap-split-fancy)
                (nnimap-split-fancy
                 (| SOME OTHER FANCY RULES HERE
                  )
                 )
                )
               )
--8<---------------cut here---------------end--------------->8---

The fancy split rules split into IMAP folders on the current server.

>>> (3) Customizing the C-x gnus menu:
>>> Right I see things like nnimap+gmail1account:INBOX. Is there a way
>>> to customize this, to look like FirstAccount:INBOX ?
>>
>> You can customize how the line for each group appears using the
>> `gnus-group-line-format' variable -- it's possible to remove the
>> backend altogether. See the "Group Line Specification" part of the
>> manual. In particular, you might try switching the %g format
>> specifier for %G?  Anyway, experiment with that!
>
> I think I'll have to write a custom function to chop off the beginning
> bit since one of the default formatting specifiers shows too much and
> the other shows too little.

The is exactly what I have done.

-- 
Jens Klöcker · Public key: http://www.kloecker.org/jens/public-key.txt
        Mastery of UNIX, like mastery of language, offers real freedom.
                                                      (Thomas Scoville)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-23 11:14     ` Jens Klöcker
@ 2015-12-23 21:38       ` Benjamin Slade
  2015-12-24  6:32         ` Eric Abrahamsen
  2015-12-24  3:28       ` Eric Abrahamsen
  1 sibling, 1 reply; 14+ messages in thread
From: Benjamin Slade @ 2015-12-23 21:38 UTC (permalink / raw)
  To: Jens Klöcker; +Cc: info-gnus-english

news@kloecker.org (Jens Klöcker) writes:

> I have one. It's looking like this:
>
> --8<---------------cut here---------------start------------->8---
> (setq gnus-secondary-select-methods
>       '((nnimap "work"
>                 SOME CONFIG OPTIONS
>                 (nnimap-inbox "INBOX")
>                 (nnimap-split-methods 'nnimap-split-fancy)
>                 (nnimap-split-fancy
>                  (| SOME FANCY RULES HERE
>                   )
>                  )
>                 )
>         (nnimap "private"
>                 SOME CONFIG OPTIONS
>                 (nnimap-inbox "INBOX")
>                 (nnimap-split-methods 'nnimap-split-fancy)
>                 (nnimap-split-fancy
>                  (| SOME OTHER FANCY RULES HERE
>                   )
>                  )
>                 )
>                )
> --8<---------------cut here---------------end--------------->8---
>

Ok, that worked for me. Many thanks.

I'm still stuck on getting my "expired" mail to move to [Gmail]/Bin

  (setq gnus-secondary-select-methods
        '((nnimap "work"
                  (nnimap-inbox "INBOX")
                  ....
                  (nnmail-expiry-target "nnimap+work:[Gmail]/Bin")					      
        	  (nnmail-expiry-wait immediate)
                  )
               )
          )

I've tried changing "nnmail-expiry-target" to "nnimap-expiry-target";
I've tried changing "/Bin" to "/Trash" (but it should be former for my
account); I've tried changing "/Bin" to ".Bin", all the various
permutations of these.

As well, I tried various ways of setting up
```nnmail-fancy-expiry-target```. But I couldn't get any of these to
work. Even with ```nnmail-expiry-wait immediate``` set. The messages are
removed from the INBOX, and marked read, but are not moved to
[Gmail]Bin(~Trash).

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-23 11:14     ` Jens Klöcker
  2015-12-23 21:38       ` Benjamin Slade
@ 2015-12-24  3:28       ` Eric Abrahamsen
  1 sibling, 0 replies; 14+ messages in thread
From: Eric Abrahamsen @ 2015-12-24  3:28 UTC (permalink / raw)
  To: info-gnus-english

news@kloecker.org (Jens Klöcker) writes:

> Hi Benjamin,
>
> Am 22.12.2015 um 22:15 Uhr schrieb Benjamin Slade:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>> You have to tell each account to use your split rules (this allows
>>> you to theoretically use different rules for different accounts). See
>>> the "Client-side IMAP Splitting" section of the manual for
>>> details. If you're using fancy splitting, I think you have to set
>>> nnimap-split-methods to nnimap-split-fancy, then set
>>> nnimap-split-fancy to the value of the splits you want to use. All
>>> that has to happen as server parameters.
>>
>> I've checked "Client-side IMAP Splitting" in the Gnus manual, and
>> tried a few different things, but nothing seems to work. (I don't get
>> any error messages either, but nothing gets refiled.)
>>
>> Does anyone have an example setup with multiple IMAP accounts and mail
>> splitting? 
>
> I have one. It's looking like this:
>
> (setq gnus-secondary-select-methods
>       '((nnimap "work"
>                 SOME CONFIG OPTIONS
>                 (nnimap-inbox "INBOX")
>                 (nnimap-split-methods 'nnimap-split-fancy)
>                 (nnimap-split-fancy
>                  (| SOME FANCY RULES HERE
>                   )
>                  )
>                 )
>         (nnimap "private"
>                 SOME CONFIG OPTIONS
>                 (nnimap-inbox "INBOX")
>                 (nnimap-split-methods 'nnimap-split-fancy)
>                 (nnimap-split-fancy
>                  (| SOME OTHER FANCY RULES HERE
>                   )
>                  )
>                 )
>                )
>
> The fancy split rules split into IMAP folders on the current server.

I think the one other thing that sometimes trips people up is when you
want to set the same rules for multiple servers, so you set the rules to
some external variable, like 'my-fancy-split-rules, and then you want to
use that in the server definitions. As far as I remember (I stopped
doing this so I forget a little), you have to use (nnimap-split-fancy
,my-fancy-split-rules) in the server definition, with the comma unquote.
Maybe someone can confirm/deny that...

>>>> (3) Customizing the C-x gnus menu:
>>>> Right I see things like nnimap+gmail1account:INBOX. Is there a way
>>>> to customize this, to look like FirstAccount:INBOX ?
>>>
>>> You can customize how the line for each group appears using the
>>> `gnus-group-line-format' variable -- it's possible to remove the
>>> backend altogether. See the "Group Line Specification" part of the
>>> manual. In particular, you might try switching the %g format
>>> specifier for %G?  Anyway, experiment with that!
>>
>> I think I'll have to write a custom function to chop off the beginning
>> bit since one of the default formatting specifiers shows too much and
>> the other shows too little.
>
> The is exactly what I have done.

Maybe it's time for a new format specifier :)

E


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-23 21:38       ` Benjamin Slade
@ 2015-12-24  6:32         ` Eric Abrahamsen
  2015-12-24 21:22           ` Benjamin Slade
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Abrahamsen @ 2015-12-24  6:32 UTC (permalink / raw)
  To: info-gnus-english

Benjamin Slade <slade@uta.edu> writes:

> news@kloecker.org (Jens Klöcker) writes:
>
>> I have one. It's looking like this:
>>
>> --8<---------------cut here---------------start------------->8---
>> (setq gnus-secondary-select-methods
>>       '((nnimap "work"
>>                 SOME CONFIG OPTIONS
>>                 (nnimap-inbox "INBOX")
>>                 (nnimap-split-methods 'nnimap-split-fancy)
>>                 (nnimap-split-fancy
>>                  (| SOME FANCY RULES HERE
>>                   )
>>                  )
>>                 )
>>         (nnimap "private"
>>                 SOME CONFIG OPTIONS
>>                 (nnimap-inbox "INBOX")
>>                 (nnimap-split-methods 'nnimap-split-fancy)
>>                 (nnimap-split-fancy
>>                  (| SOME OTHER FANCY RULES HERE
>>                   )
>>                  )
>>                 )
>>                )
>> --8<---------------cut here---------------end--------------->8---
>>
>
> Ok, that worked for me. Many thanks.
>
> I'm still stuck on getting my "expired" mail to move to [Gmail]/Bin
>
>   (setq gnus-secondary-select-methods
>         '((nnimap "work"
>                   (nnimap-inbox "INBOX")
>                   ....
>                   (nnmail-expiry-target "nnimap+work:[Gmail]/Bin")					      
>         	  (nnmail-expiry-wait immediate)
>                   )
>                )
>           )
>
> I've tried changing "nnmail-expiry-target" to "nnimap-expiry-target";
> I've tried changing "/Bin" to "/Trash" (but it should be former for my
> account); I've tried changing "/Bin" to ".Bin", all the various
> permutations of these.
>
> As well, I tried various ways of setting up
> ```nnmail-fancy-expiry-target```. But I couldn't get any of these to
> work. Even with ```nnmail-expiry-wait immediate``` set. The messages are
> removed from the INBOX, and marked read, but are not moved to
> [Gmail]Bin(~Trash).

`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.

Hope that helps,
Eric


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-24  6:32         ` Eric Abrahamsen
@ 2015-12-24 21:22           ` Benjamin Slade
  2015-12-25  2:11             ` Eric Abrahamsen
  2015-12-25  3:18             ` B.V. Raghav
  0 siblings, 2 replies; 14+ messages in thread
From: Benjamin Slade @ 2015-12-24 21:22 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: info-gnus-english


Eric Abrahamsen <eric@ericabrahamsen.net> 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?


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-24 21:22           ` Benjamin Slade
@ 2015-12-25  2:11             ` Eric Abrahamsen
  2015-12-27  4:01               ` Benjamin Slade
  2015-12-25  3:18             ` B.V. Raghav
  1 sibling, 1 reply; 14+ messages in thread
From: Eric Abrahamsen @ 2015-12-25  2:11 UTC (permalink / raw)
  To: info-gnus-english

Benjamin Slade <slade@jnanam.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> 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!



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-24 21:22           ` Benjamin Slade
  2015-12-25  2:11             ` Eric Abrahamsen
@ 2015-12-25  3:18             ` B.V. Raghav
  2015-12-25  3:25               ` Eric Abrahamsen
  1 sibling, 1 reply; 14+ messages in thread
From: B.V. Raghav @ 2015-12-25  3:18 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: Eric Abrahamsen, info-gnus-english


> (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))
    ;;                          ^ should this be a forward slash `/'
    ;;                            that is [Gmail]/Bin
    ;;                            instead of backslash `\' in [Gmail]\Bin

>   'delete))


-- 
(B.V. Raghav)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-25  3:18             ` B.V. Raghav
@ 2015-12-25  3:25               ` Eric Abrahamsen
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Abrahamsen @ 2015-12-25  3:25 UTC (permalink / raw)
  To: info-gnus-english

"B.V. Raghav" <bvraghav@iitk.ac.in> writes:

>> (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))
>     ;;                          ^ should this be a forward slash `/'
>     ;;                            that is [Gmail]/Bin
>     ;;                            instead of backslash `\' in [Gmail]\Bin
>
>>   'delete))

Good catch!



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-25  2:11             ` Eric Abrahamsen
@ 2015-12-27  4:01               ` Benjamin Slade
  2015-12-27  4:08                 ` Eric Abrahamsen
  0 siblings, 1 reply; 14+ messages in thread
From: Benjamin Slade @ 2015-12-27  4:01 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>> 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!

After many hours of wrestling with this, it turns out to have nothing to
do with Gnus. It's a quirk about Gmail's mail arrangement, and the way
that mbsync works.  It seems I had a similar problem a few years ago
when I used mbsync for mu4e for a little while (though I have no memory
of this), and so my Google searches ultimately led me back to my own old
question (and, fortunately, solution):
http://sourceforge.net/p/isync/mailman/message/31638141/ :---

     The trick is to make a separate mbsync channel and sync the
     Trash/Bin first.

Though, ultimately (actually in the course of trying to find a solution)
I ended up switching to using fancy-expire (keyed to email addresses)
instead, as the other method doesn't work for virtual groups.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-27  4:01               ` Benjamin Slade
@ 2015-12-27  4:08                 ` Eric Abrahamsen
  2015-12-28  0:33                   ` B.V. Raghav
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Abrahamsen @ 2015-12-27  4:08 UTC (permalink / raw)
  To: info-gnus-english

Benjamin Slade <slade@jnanam.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>>> 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!
>
> After many hours of wrestling with this, it turns out to have nothing to
> do with Gnus. It's a quirk about Gmail's mail arrangement, and the way
> that mbsync works.  It seems I had a similar problem a few years ago
> when I used mbsync for mu4e for a little while (though I have no memory
> of this), and so my Google searches ultimately led me back to my own old
> question (and, fortunately, solution):
> http://sourceforge.net/p/isync/mailman/message/31638141/ :---
>
>      The trick is to make a separate mbsync channel and sync the
>      Trash/Bin first.
>
> Though, ultimately (actually in the course of trying to find a solution)
> I ended up switching to using fancy-expire (keyed to email addresses)
> instead, as the other method doesn't work for virtual groups.

Oof. That doesn't sound like much fun, but I'm glad you got it sorted. I
have to say, imap got a lot easier to work with when I switched away
from Gmail...



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: multi-email gnus setup questions
  2015-12-27  4:08                 ` Eric Abrahamsen
@ 2015-12-28  0:33                   ` B.V. Raghav
  0 siblings, 0 replies; 14+ messages in thread
From: B.V. Raghav @ 2015-12-28  0:33 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: info-gnus-english

Hi,

> Oof. That doesn't sound like much fun, but I'm glad you got it sorted. I
> have to say, imap got a lot easier to work with when I switched away
> from Gmail...
>
That is an feeling I perfectly resonate with.

Thanks,
r
-- 
(B.V. Raghav)


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-12-28  0:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22  0:05 multi-email gnus setup questions Benjamin Slade
2015-12-22  1:06 ` Eric Abrahamsen
2015-12-22 21:15   ` Benjamin Slade
     [not found]   ` <mailman.430.1450858810.843.info-gnus-english@gnu.org>
2015-12-23 11:14     ` Jens Klöcker
2015-12-23 21:38       ` Benjamin Slade
2015-12-24  6:32         ` Eric Abrahamsen
2015-12-24 21:22           ` Benjamin Slade
2015-12-25  2:11             ` Eric Abrahamsen
2015-12-27  4:01               ` Benjamin Slade
2015-12-27  4:08                 ` Eric Abrahamsen
2015-12-28  0:33                   ` B.V. Raghav
2015-12-25  3:18             ` B.V. Raghav
2015-12-25  3:25               ` Eric Abrahamsen
2015-12-24  3:28       ` Eric Abrahamsen

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).