Gnus development mailing list
 help / color / mirror / Atom feed
* Mail splitting stopped working with Emacs 25
@ 2016-08-09 15:14 Jarmo Hurri
  2016-08-09 15:38 ` Adam Sjøgren
  0 siblings, 1 reply; 5+ messages in thread
From: Jarmo Hurri @ 2016-08-09 15:14 UTC (permalink / raw)
  To: ding


Greetings.

The subject describes the problem. I am getting a bit desperate here. I
have two questions. The first one is short and would solve the entire
problem. The second one describes the problem.

1. If anyone has a working imap mail splitting definition for Emacs 25
   which uses gnus-group-browse-foreign-server to subscribe to the imap
   groups I would like to see it. I can probably figure out my own
   version from it.

2. Now the _long_ version.

   In Emacs 24 I had the following way to subscribe to imap and split
   my mail.

   i. I subscribed to the imap boxes by evaluating

      (gnus-group-browse-foreign-server
        '(nnimap "mail"
           (nnimap-address "mail.server.com")
           (nnimap-stream ssl)
           (nnimap-server-port 993)))

   ii. Then in my .gnus I defined the equivalent of the following:

      (setq nnimap-inbox "INBOX")
      (setq nnimap-split-methods
       '(
        ("lists" "^\\(To\\|Cc\\):.*list")
        ("Spam" "^From:.*spamster")
        ("personal" "")))
        

   This stopped working in Emacs 25. The following thread examined some
   of the problems involved:

   https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-07/msg00549.html

   Ok, so I set out to solve the problem. My FIRST EFFORT was to try to
   pass my splitting rules to gnus-group-browse-foreign-server,
   something along the lines of evaluating

      (gnus-group-browse-foreign-server
        '(nnimap "mail"
           (nnimap-address "mail.server.com")
           (nnimap-stream ssl)
           (nnimap-server-port 993)
           (nnimap-inbox "INBOX")
           (nnimap-split-methods
             '(
               ("lists" "^\\(To\\|Cc\\):.*list")
               ("Spam" "^From:.*spamster")
               ("personal" "")))))


   That resulted in really weird behaviour, with mail being split
   correctly when I first subscribed, but then all the mail going to
   "mail.misc" on subsequent restarts of gnus.

   SECOND TRY: use gnus-secondary-select-methods with a variable,
   something equivalent to

   (setq my-nnimap-split-methods
     '(
       ("lists" "^\\(To\\|Cc\\):.*list")
       ("Spam" "^From:.*spamster")
       ("personal" "")))
   
   (add-to-list 'gnus-secondary-select-methods
        '(nnimap "mail"
           (nnimap-address "mail.server.com")
           (nnimap-stream ssl)
           (nnimap-server-port 993)
           (nnimap-inbox "INBOX")
           (nnimap-split-methods my-nnimap-split-methods)))

    This gave me _no mail_: no imap boxes, no mail whatsoever, nothing
    even related to imap in buffer *Messages*. I have no idea why.

    THIRD TRY. My original splitting was not fancy, but the guy I
    referred to above had used it succesfully. So I converted my
    splitting rules to fancy form, and tried to browse the foreign
    server again:

    (setq nnimap-split-fancy
      '(|
	(to "list" "lists")
        (from "spamster" "Spam")
	"personal"
	))

     (gnus-group-browse-foreign-server
        '(nnimap "mail"
           (nnimap-address "mail.server.com")
           (nnimap-stream ssl)
           (nnimap-server-port 993)
           (nnimap-inbox "INBOX")
           (nnimap-split-methods 'nnimap-split-fancy)))

     Still no working splitting: all the mail gets split into box
     "mail.misc".

I would _really_ appreciate help here.

Jarmo




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

* Re: Mail splitting stopped working with Emacs 25
  2016-08-09 15:14 Mail splitting stopped working with Emacs 25 Jarmo Hurri
@ 2016-08-09 15:38 ` Adam Sjøgren
  2016-08-09 15:49   ` Jarmo Hurri
  2016-08-09 16:20   ` Jarmo Hurri
  0 siblings, 2 replies; 5+ messages in thread
From: Adam Sjøgren @ 2016-08-09 15:38 UTC (permalink / raw)
  To: ding

Jarmo writes:

> 1. If anyone has a working imap mail splitting definition for Emacs 25
>    which uses gnus-group-browse-foreign-server to subscribe to the imap
>    groups

Could it be that Emacs thinks the mail in your INBOX already has been
split?

What does B q on an email say?

What does B t on an email show?

Just our of curiosity: why do you insist on using
gnus-group-browse-foreign-server instead of the usual
gnus-secondary-select-methods?

(I don't use IMAP currently, and never used IMAP-splitting - so I really
should just shut up - but taking the road less travelled could be
tougher.)

>    SECOND TRY: use gnus-secondary-select-methods with a variable,
>    something equivalent to
>
>    (setq my-nnimap-split-methods
>      '(
>        ("lists" "^\\(To\\|Cc\\):.*list")
>        ("Spam" "^From:.*spamster")
>        ("personal" "")))
>    
>    (add-to-list 'gnus-secondary-select-methods
>         '(nnimap "mail"
>            (nnimap-address "mail.server.com")
>            (nnimap-stream ssl)
>            (nnimap-server-port 993)
>            (nnimap-inbox "INBOX")
>            (nnimap-split-methods my-nnimap-split-methods)))
>
>     This gave me _no mail_: no imap boxes, no mail whatsoever, nothing
>     even related to imap in buffer *Messages*. I have no idea why.

Did the server buffer show your server ("{nnimap:mail}")?


  Best regards,

    Adam

-- 
 "I am still twitching at the idea that you need to           Adam Sjøgren
  load code into the kernel in order to re-map a         asjo@koldfront.dk
  mouse button."




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

* Re: Mail splitting stopped working with Emacs 25
  2016-08-09 15:38 ` Adam Sjøgren
@ 2016-08-09 15:49   ` Jarmo Hurri
  2016-08-09 16:20   ` Jarmo Hurri
  1 sibling, 0 replies; 5+ messages in thread
From: Jarmo Hurri @ 2016-08-09 15:49 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Jarmo writes:
>
>> 1. If anyone has a working imap mail splitting definition for Emacs 25
>>    which uses gnus-group-browse-foreign-server to subscribe to the imap
>>    groups
>
> Could it be that Emacs thinks the mail in your INBOX already has been
> split?

Well, it actually does split the mail, just puts it into "mail.misc"
instead of the boxes where I would like it to go.

I guess the main difference between Emacs 24 and 25 is that a number of
variables are now server-specific. For example, setting
nnimap-split-methods to some value globally doesn't help, since it gets
reset. That is the gist of the thread I gave a link to in my message, if
I understood correctly.

> Just our of curiosity: why do you insist on using
> gnus-group-browse-foreign-server instead of the usual
> gnus-secondary-select-methods?

It's been ages since I "decided" how to subscribe to imap, and I have
been using the same method since. But see below.

>>    SECOND TRY: use gnus-secondary-select-methods with a variable,
>>    something equivalent to
>>
>>    (setq my-nnimap-split-methods
>>      '(
>>        ("lists" "^\\(To\\|Cc\\):.*list")
>>        ("Spam" "^From:.*spamster")
>>        ("personal" "")))
>>    
>>    (add-to-list 'gnus-secondary-select-methods
>>         '(nnimap "mail"
>>            (nnimap-address "mail.server.com")
>>            (nnimap-stream ssl)
>>            (nnimap-server-port 993)
>>            (nnimap-inbox "INBOX")
>>            (nnimap-split-methods my-nnimap-split-methods)))
>>
>>     This gave me _no mail_: no imap boxes, no mail whatsoever, nothing
>>     even related to imap in buffer *Messages*. I have no idea why.
>
> Did the server buffer show your server ("{nnimap:mail}")?

Nope. It is as if the secondary method has absolutely no effect.

Jarmo




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

* Re: Mail splitting stopped working with Emacs 25
  2016-08-09 15:38 ` Adam Sjøgren
  2016-08-09 15:49   ` Jarmo Hurri
@ 2016-08-09 16:20   ` Jarmo Hurri
  2016-08-09 20:13     ` Adam Sjøgren
  1 sibling, 1 reply; 5+ messages in thread
From: Jarmo Hurri @ 2016-08-09 16:20 UTC (permalink / raw)
  To: ding


Problem solved, thanks to Jorge and Adam.

First, I got the following response:

(Jorge) writes:

> Try:  #+BEGIN_SRC emacs-lisp
> (add-to-list 'gnus-secondary-select-methods
> '(nnimap "mail"
>            (nnimap-address "mail.server.com")
>            (nnimap-stream ssl)
>            (nnimap-server-port 993)
>            (nnimap-inbox "INBOX")
>            (nnimap-split-methods default)))
> #+END_SRC
>
> And then set the variable nnmail-split-methods to
> my-nnimap-split-methods. 

and that does the trick. A combination of 'default' and setting
'nnmail-split-methods' carries over to the server. Excellent.

Also, I was able to simplify my imap subscription by thinking about what
Adam wrote:

asjo@koldfront.dk (Adam Sjøgren) writes:

> Just our of curiosity: why do you insist on using
> gnus-group-browse-foreign-server instead of the usual
> gnus-secondary-select-methods?

I started to think about _why_ I had browsed foreign groups. I had
actually disabled my primary server, which also automatically meant that
secondary select methods weren't called. So I also got rid of foreign
groups in the same process.

Thank you guys very much!

Jarmo




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

* Re: Mail splitting stopped working with Emacs 25
  2016-08-09 16:20   ` Jarmo Hurri
@ 2016-08-09 20:13     ` Adam Sjøgren
  0 siblings, 0 replies; 5+ messages in thread
From: Adam Sjøgren @ 2016-08-09 20:13 UTC (permalink / raw)
  To: ding

Jarmo writes:

> Problem solved, thanks to Jorge and Adam.

All's well that ends well!


  Best regards,

    Adam

-- 
 "I think I've learned by now                                 Adam Sjøgren
  There's never an easy way"                             asjo@koldfront.dk




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

end of thread, other threads:[~2016-08-09 20:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 15:14 Mail splitting stopped working with Emacs 25 Jarmo Hurri
2016-08-09 15:38 ` Adam Sjøgren
2016-08-09 15:49   ` Jarmo Hurri
2016-08-09 16:20   ` Jarmo Hurri
2016-08-09 20:13     ` Adam Sjøgren

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