unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
@ 2015-05-19 12:40 Sebastien Vauban
  2015-05-19 17:35 ` Stefan Monnier
  2016-10-14 10:33 ` bug#20610: 25.1.1 " Gijs Hillenius
  0 siblings, 2 replies; 10+ messages in thread
From: Sebastien Vauban @ 2015-05-19 12:40 UTC (permalink / raw)
  To: 20610-ubl+/3LiMTaZdePnXv/OxA

While "fancy mail splitting" (section 6.4.6 of the manual) with the
`gnus-private' attribute of BBDB [1] works perfectly -- for years! --
under (Windows) Emacs 24.5 (and many previous versions), it stops
working when using Emacs 25.0.50 [2]... while (let's be explicit!) the
`.gnus' file stays strictly the same.

Here a minimal working configuration file for Emacs 24.5:

--8<---------------cut here---------------start------------->8---
(require 'gnus)

(require 'auth-source)
(setq auth-source-debug t)

;; Configure incoming mail.
(setq gnus-select-method
      '(nnimap "mail"
               (nnimap-address "mail")
               (nnimap-server-port 993)
               (nnimap-stream ssl)))

;; Name(s) of IMAP mailboxes to split mail from.
(setq nnimap-inbox "INBOX")

;; The first match in `nnmail-split-rule' found will be used.
(setq nnmail-crosspost nil)

;; BBDB (Big Brother DataBase) is loaded from my `.emacs' file.
(require 'bbdb-gnus)

;; Split function to use (sorting mails into groups using BBDB).
(setq nnimap-split-methods 'nnimap-split-fancy)

;; Specify how to split mail.
(setq nnimap-split-fancy
      '(|                           ; split to the *first* match
          ;; Invoke BBDB.
          (: (lambda ()
               (car (bbdb/gnus-split-method))))

          ;; Catch spam.
          ("X-Spam-Status" "[Yy]es"
           "INBOX.Spam")

          ;; Undecided.
          "INBOX"))

;; For records which don't have `gnus-private' set, the rules in
;; `split-fancy' are invoked.
(setq bbdb/gnus-split-default-group nil)

;;; .gnus ends here
--8<---------------cut here---------------end--------------->8---

I've tried numerous changes (for hours), such as:

- renaming `nnimap-split-methods' to `nnmail-split-methods' and
  `nnimap-split-fancy' to `nnmail-split-fancy', or

- moving `nnimap-inbox' and `nnimap-split-methods' (without the `setq'
  and without the quotes) inside the definition of `gnus-select-method',

with no success. In those 2 latter cases, it even stops working within
Emacs 24.5, so this seems not to be the right path...

Best regards.

[1] ~/.emacs.d/elpa/bbdb-20140830.2031/bbdb-gnus.elc

[2] GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2015-05-08 on LEG570






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

* bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
  2015-05-19 12:40 bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore Sebastien Vauban
@ 2015-05-19 17:35 ` Stefan Monnier
       [not found]   ` <jwviobojwsf.fsf-monnier+emacsbugs-mXXj517/zsQ@public.gmane.org>
  2016-10-14 10:33 ` bug#20610: 25.1.1 " Gijs Hillenius
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2015-05-19 17:35 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: 20610

> While "fancy mail splitting" (section 6.4.6 of the manual) with the
> `gnus-private' attribute of BBDB [1] works perfectly -- for years! --
> under (Windows) Emacs 24.5 (and many previous versions), it stops
> working when using Emacs 25.0.50 [2]... while (let's be explicit!) the
> `.gnus' file stays strictly the same.

Few!  I was afraid that at this point you'd give us the actual error message!


        Stefan





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

* bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
       [not found]   ` <jwviobojwsf.fsf-monnier+emacsbugs-mXXj517/zsQ@public.gmane.org>
@ 2015-05-19 17:57     ` Sebastien Vauban
  2015-05-19 18:39       ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastien Vauban @ 2015-05-19 17:57 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 20610-ubl+/3LiMTaZdePnXv/OxA

Stefan Monnier <monnier-CRDzTM1onBSWkKpYnGOUKg@public.gmane.org> writes:
>> While "fancy mail splitting" (section 6.4.6 of the manual) with the
>> `gnus-private' attribute of BBDB [1] works perfectly -- for years! --
>> under (Windows) Emacs 24.5 (and many previous versions), it stops
>> working when using Emacs 25.0.50 [2]... while (let's be explicit!) the
>> `.gnus' file stays strictly the same.
>
> Few!  I was afraid that at this point you'd give us the actual error
> message!

I wish I could, but there isn't:

--8<---------------cut here---------------start------------->8---
...
nnimap read 10k from mail
Reading active file via nndraft...done
Checking new news...done
...
--8<---------------cut here---------------end--------------->8---

Not even a message about splitting.

The only visible difference is that, under 24.5, it does apply the
splitting rules, and it does not under 25.0.

Now, if there is a mean to get more verbose output, or something in the
same vein, I'm (of course) willing to try...

Best regards,
  Seb





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

* bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
  2015-05-19 17:57     ` Sebastien Vauban
@ 2015-05-19 18:39       ` Stefan Monnier
  2015-05-20  0:22         ` Katsumi Yamaoka
       [not found]         ` <mailman.3294.1432081389.904.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2015-05-19 18:39 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: 20610

>> Few!  I was afraid that at this point you'd give us the actual error
>> message!
> I wish I could, but there isn't:
> --8<---------------cut here---------------start------------->8---
> ...
> nnimap read 10k from mail
> Reading active file via nndraft...done
> Checking new news...done
> ...
> --8<---------------cut here---------------end--------------->8---
> Not even a message about splitting.

Well, that's already a lot more precise than just saying "stops
working", thanks.

> The only visible difference is that, under 24.5, it does apply the
> splitting rules, and it does not under 25.0.

I think we need some help from the Gnus guys here,


        Stefan





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

* bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
  2015-05-19 18:39       ` Stefan Monnier
@ 2015-05-20  0:22         ` Katsumi Yamaoka
       [not found]         ` <mailman.3294.1432081389.904.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Katsumi Yamaoka @ 2015-05-20  0:22 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: 20610

On Tue, 19 May 2015 14:39:29 -0400, Stefan Monnier wrote:
> I think we need some help from the Gnus guys here,

After starting up Gnus, try this form in the *scratch* buffer:

(featurep 'bbdb-gnus) ;; Type `C-j' at the end of the form.

If this returns nil, it means your ~/.gnus file, containing
the splitting rules, is not loaded.  If so, a possible cause is
that you have ~/.gnus.el or ~/.gnus.elc, that's accidentally made.
Gnus prefers those files than ~/.gnus [1].  Even if ~/.gnus.el
or ~/.gnus.elc is empty, Gnus would work just like normal
because of ~/.newsrc.eld.

[1] (info "(gnus)Startup Files")





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

* bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
       [not found]           ` <868uckoi50.fsf-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>
@ 2015-05-21 11:51             ` Sebastien Vauban
  2015-07-24 14:49             ` Sebastien Vauban
  1 sibling, 0 replies; 10+ messages in thread
From: Sebastien Vauban @ 2015-05-21 11:51 UTC (permalink / raw)
  To: Katsumi Yamaoka, Stefan Monnier; +Cc: 20610-ubl+/3LiMTaZdePnXv/OxA

Katsumi Yamaoka <yamaoka-NvgVpDro27E@public.gmane.org> writes:
> On Tue, 19 May 2015 14:39:29 -0400, Stefan Monnier wrote:
>> I think we need some help from the Gnus guys here,
>
> After starting up Gnus, try this form in the *scratch* buffer:
>
> (featurep 'bbdb-gnus) ;; Type `C-j' at the end of the form.
>
> If this returns nil, it means your ~/.gnus file, containing
> the splitting rules, is not loaded.

It _is_ loaded; it returns `t'.

> If so, a possible cause is that you have ~/.gnus.el or ~/.gnus.elc,
> that's accidentally made.  Gnus prefers those files than ~/.gnus.
> Even if ~/.gnus.el or ~/.gnus.elc is empty, Gnus would work just like
> normal because of ~/.newsrc.eld.

I know that, that's why I never ever compile my config files -- because
I've been hit quite a couple of times but that problem in the past, and
because the startup time of my Emacs/Gnus is already very decent now (in
the order of 1 to 3 seconds).

As I said, what's un-understandable right now, is that my config _works_
with Emacs 24.5 and (the exact same) does not with Emacs 25.

The problems you point to (possibly missing package or use of
a compiled, not up-to-date, config file) couldn't explain that fact.

Both versions of Emacs read my `~/.gnus' file and load the `bbdb-gnus'
library found at `~/.emacs.d/elpa/bbdb-20140830.2031/bbdb-gnus.elc'.

To add more data points, here is a comparison of what's displayed in the
`*Messages*' buffer for both sessions:

- With Emacs 24.5:

--8<---------------cut here---------------start------------->8---
  Opening connection to mail via tls...
  auth-source-search: found 1 results (max 1) matching (:max 1 :host ("mail") :port (993 "imaps" "imap" "993" "143") :user nil :require (:user :secret) :create t)
  Opening connection to mail...done
  Reading d:/Users/sva/.gnus.d/.newsrc.eld...
  Checking new news...
  Decrypting d:/Users/sva/.authinfo.gpg...done
  auth-source-search: found 1 results (max 1) matching (:max 1 :host ("news.gmane.org" "gmane") :port ("119" "nntp" "nntp" "563" "nntps" "snews"))
  auth-source-search: found 1 results (max 1) matching (:max 1 :host ("news.eternal-september.org" "eternal-september") :port ("119" "nntp" "nntp" "563" "nntps" "snews"))
> nnimap mail splitting mail...
  nnimap read 0k from mail
> Parsing BBDB...
> Duplicate BBDB record encountered: Support
> Parsing BBDB...done
> nnimap mail splitting mail...done
> nnimap read 2k from mail
  Reading active file via nndraft...done
  Checking new news...done
--8<---------------cut here---------------end--------------->8---

- With Emacs 25.0:

--8<---------------cut here---------------start------------->8---
  Opening connection to mail via tls...
  auth-source-search: found 1 results (max 1) matching (:max 1 :host ("mail") :port (993 "imaps" "imap" "993" "143") :user nil :require (:user :secret) :create t)
  Opening connection to mail...done
  Reading d:/Users/sva/.gnus.d/.newsrc.eld...
  Checking new news...
  Decrypting d:/Users/sva/.authinfo.gpg...done
  auth-source-search: found 1 results (max 1) matching (:max 1 :host ("news.gmane.org" "gmane") :port ("119" "nntp" "nntp" "563" "nntps" "snews"))
> Unable to open server nntp+gmane due to: Authorization Rejected
  auth-source-search: found 1 results (max 1) matching (:max 1 :host ("news.eternal-september.org" "eternal-september") :port ("119" "nntp" "nntp" "563" "nntps" "snews"))
  nnimap read 0k from mail
  Reading active file via nndraft...done
  Checking new news...done
--8<---------------cut here---------------end--------------->8---

Note that I've prefixed the lines which are different with a ">".

Best regards,
  Seb

PS- I also have a problem with Gmane in Emacs 25.0, but I didn't look
    into that yet.





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

* bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
       [not found]             ` <mailman.3370.1432209128.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
@ 2015-05-22 21:36               ` Sebastien Vauban
  0 siblings, 0 replies; 10+ messages in thread
From: Sebastien Vauban @ 2015-05-22 21:36 UTC (permalink / raw)
  To: Katsumi Yamaoka, Stefan Monnier; +Cc: 20610-ubl+/3LiMTaZdePnXv/OxA

Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org> writes:
> Katsumi Yamaoka <yamaoka-NvgVpDro27E@public.gmane.org> writes:
>> On Tue, 19 May 2015 14:39:29 -0400, Stefan Monnier wrote:
>>> I think we need some help from the Gnus guys here,
>>
>> (featurep 'bbdb-gnus) ;; Type `C-j' at the end of the form.
>
> It _is_ loaded; it returns `t'.  [...]  Both versions of Emacs read my
> `~/.gnus' file and load the `bbdb-gnus' library found at
> `~/.emacs.d/elpa/bbdb-20140830.2031/bbdb-gnus.elc'.

I'm progressing -- a bit.  I just found out that, adding good ol'
messages, the conditional code is well executed (as already said)...

--8<---------------cut here---------------start------------->8---
  (message ">>> >>> %S <<< <<<" nnimap-split-methods)

  (when (require 'bbdb-gnus)

    (message ">>> >>> Inside! <<< <<<")

    ;; Split function to use (sorting mails into groups using BBDB).
    (setq nnimap-split-methods 'nnimap-split-fancy)

    ;; Specify how to split mail.
    (setq nnimap-split-fancy            ; vs `nnmail-split-fancy'?
          '(|                           ; Split to the *first* match.

              ;; Invoke BBDB.
              (: (lambda ()
                   (car (bbdb/gnus-split-method))))

              ;; Catch spam.
              ("X-Spam-Status" "[Yy]es"
               "INBOX.Spam")

              ;; Undecided.
              "INBOX"))

    ;; For records which don't have `gnus-private' set, the rules in
    ;; `split-fancy' are invoked.
    (setq bbdb/gnus-split-default-group nil))

    (message ">>> >>> %S <<< <<<" nnimap-split-methods)
--8<---------------cut here---------------end--------------->8---

gives:

--8<---------------cut here---------------start------------->8---
>>> >>> nil <<< <<<
>>> >>> Inside! <<< <<<
>>> >>> nnimap-split-fancy <<< <<<
--8<---------------cut here---------------end--------------->8---

... but, in Emacs 25.0, _after having started Gnus_, when I type `C-h
v nnimap-split-methods', I get `nil'!!!  And similarly for
`nnimap-split-fancy'... So, these variables gets reinitialized after my
code is run...  How?  Why?

In Emacs 25, if I reevaluate the above 2 vars (`nnimap-split-methods'
and `nnimap-split-fancy'), the mail splitting is still not working,
though `B t' indicates it would go to the right mailbox!  Why??

Another difference with Emacs 24.5: for these 3 messages to be evaluated
correctly, I had to explicitly add a `require 'nnimap' before the first
call to `message'. Otherwise, I had an "Error in ~/.gnus:
nnimap-split-methods"... Why is the variable not defined (I guess it
means that) in Emacs 24.5 and well in Emacs 25 -- without the explicit
call to nnimap?

Do the above ring a bell to someone?

I've seen that the nnimap vars are defined thru `defvoo' calls. I wasn't
aware of such a macro, and don't know yet its real effects...

Best regards,
  Seb

-- 
Sebastien Vauban





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

* Re: bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
       [not found]             ` <mailman.3483.1432330630.904.bug-gnu-emacs@gnu.org>
@ 2015-07-24 12:46               ` Sebastien Vauban
  0 siblings, 0 replies; 10+ messages in thread
From: Sebastien Vauban @ 2015-07-24 12:46 UTC (permalink / raw)
  To: bug-gnu-emacs

Sebastien Vauban <sva-news@mygooglest.com> writes:
> Sebastien Vauban <sva-news@mygooglest.com> writes:
>> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>> On Tue, 19 May 2015 14:39:29 -0400, Stefan Monnier wrote:
>>>> I think we need some help from the Gnus guys here,
>>>
>>> (featurep 'bbdb-gnus) ;; Type `C-j' at the end of the form.
>>
>> It _is_ loaded; it returns `t'.  [...]  Both versions of Emacs read my
>> `~/.gnus' file and load the `bbdb-gnus' library found at
>> `~/.emacs.d/elpa/bbdb-20140830.2031/bbdb-gnus.elc'.
>
> I'm progressing -- a bit.  I just found out that [...] in Emacs 25.0,
> _after having started Gnus_, when I type `C-h v nnimap-split-methods',
> I get `nil'!!!  And similarly for `nnimap-split-fancy'... So, these
> variables gets reinitialized after my code is run...  How?  Why?

As I still need to read my mails within Emacs 25.0, and as the fancy
mail splitting still does not work for me there (while it does, with
the same config file, within Emacs 24.5), I have done more tests, adding
the following to my startup file:

--8<---------------cut here---------------start------------->8---
(defconst elt-require-depth 0 
  "Starting depth for load tree.") 

(defadvice require (around leuven-require activate)
  "Leave a trace of packages being loaded."
  (let* ((feature (ad-get-arg 0))
         (prefix-already (concat (make-string (* 4 elt-require-depth) ? ) "+-- "))
         (prefix-open    (concat (make-string (* 4 elt-require-depth) ? ) "+-> "))
         (prefix-close   (concat (make-string (* 4 elt-require-depth) ? ) "--> ")))
    (cond ((featurep feature)
           (message "    [Value of `nnimap-split-methods' before requiring `%S': %s]" feature nnimap-split-methods)
           (message "%s%s <from %s>... already loaded"
                    prefix-already feature
                    (ignore-errors (file-name-base load-file-name)))
           (message "    [Value of `nnimap-split-methods' after requiring `%S': %s]" feature nnimap-split-methods)
           (setq ad-return-value feature))
          (t
           (message "%s%s <from %s>... %s"
                    prefix-open feature
                    (ignore-errors (file-name-base load-file-name))
                    (locate-library (symbol-name feature)))
           (message "    [Value of `nnimap-split-methods' before requiring `%S': %s]" feature nnimap-split-methods)
           (let ((elt-require-depth (1+ elt-require-depth)))
             ad-do-it)
           (message "    [Value of `nnimap-split-methods' after requiring `%S': %s]" feature nnimap-split-methods)
           (message "%s%s <from %s>... loaded"
                    prefix-close feature
                    (ignore-errors (file-name-base load-file-name)))))))
--8<---------------cut here---------------end--------------->8---

The effect, shown in both Emacs 24.5 and Emacs 25.0, is shown at the
screenshot http://screencast.com/t/akk7Mbx1q:

--8<---------------cut here---------------start------------->8---
+-- nntp <from nil>... already loaded
    [Value of `nnimap-split-methods' after requiring `nntp': nnimap-split-fancy]
Opening connection to mail via tls...
    [Value of `nnimap-split-methods' before requiring `tls': nil]
+-- tls <from network-stream>... already loaded
--8<---------------cut here---------------end--------------->8---

You can see that `nnimap-split-methods' gets reset to nil (in Emacs
25.0) somewhere between requiring `nntp' and "Opening connection to
<nnimap-address> via tls..." (function `nnimap-open-connection-1' in
`nnimap.el').  Why???

That must explain why no splitting is done on my mailbox.

Can anyone give me any hint on how to debug this further?  Please!  I'm
out of ideas on how to progress.

Best regards,
  Seb

PS- "Full" config being used:

--8<---------------cut here---------------start------------->8---
;;* Loading

(require 'gnus)
(require 'nnimap)

(defconst elt-require-depth 0 
  "Starting depth for emacs-load-time tree.") 

(defadvice require (around leuven-require activate)
  "Leave a trace of packages being loaded."
  (let* ((feature (ad-get-arg 0))
         (prefix-already (concat (make-string (* 4 elt-require-depth) ? ) "+-- "))
         (prefix-open    (concat (make-string (* 4 elt-require-depth) ? ) "+-> "))
         (prefix-close   (concat (make-string (* 4 elt-require-depth) ? ) "--> ")))
    (cond ((featurep feature)
           (message "    [Value of `nnimap-split-methods' before requiring `%S': %s]" feature nnimap-split-methods)
           (message "%s%s <from %s>... already loaded"
                    prefix-already feature
                    (ignore-errors (file-name-base load-file-name)))
           (message "    [Value of `nnimap-split-methods' after requiring `%S': %s]" feature nnimap-split-methods)
           (setq ad-return-value feature)) ; set the return value in the case
                                        ; `ad-do-it' is not called
          (t
           (message "%s%s <from %s>... %s"
                    prefix-open feature
                    (ignore-errors (file-name-base load-file-name))
                    (locate-library (symbol-name feature)))
           (message "    [Value of `nnimap-split-methods' before requiring `%S': %s]" feature nnimap-split-methods)
           (let ((elt-require-depth (1+ elt-require-depth)))
             ad-do-it)
           (message "    [Value of `nnimap-split-methods' after requiring `%S': %s]" feature nnimap-split-methods)
           (message "%s%s <from %s>... loaded"
                    prefix-close feature
                    (ignore-errors (file-name-base load-file-name)))))))

;;* Starting Gnus

  (message "Starting Gnus...")

  ;; Support for `.authinfo' file.
  (when (try-require 'auth-source)

    ;; Log debug messages.
    (setq auth-source-debug t))

  ;; Configure incoming mail.
  (setq gnus-select-method
        '(nnimap "mail"
                 (nnimap-address "mail")
                 (nnimap-server-port 993)
                 (nnimap-stream ssl)))

  ;; Using Gnus for news.
  (setq gnus-secondary-select-methods
        '((nntp "gmane"
                (nntp-address "news.gmane.org"))
          (nntp "eternal-september"
                (nntp-address "news.eternal-september.org"))))

;; Gnus will not check for new newsgroups at startup.
  (setq gnus-check-new-newsgroups nil)

  ;; Don't save the list of killed groups.
  (setq gnus-save-killed-list nil)

  ;; Don't save a `.newsrc' file (for using other newsreaders) on exit.
  (setq gnus-save-newsrc-file nil)      ; Speed-up.

  ;; Ignore the `.newsrc' file.
  (setq gnus-read-newsrc-file nil)      ; Speed-up.

  ;; My `.newsrc' file (and the derived .el/.eld files).
  (setq gnus-startup-file (concat gnus-directory ".newsrc"))

  ;; Enable showing of [Gmail]/* groups.
  (setq gnus-ignored-newsgroups "")

  ;; Unconditionally read the dribble file.
  (setq gnus-always-read-dribble-file t)

  ;;  Gnus will only know about the groups in my `.newsrc' file
  (setq gnus-read-active-file nil)  ; speed-up

  (message "Starting Gnus... Done")

;;* Select Methods

  (message "6 Select Methods...")

  ;; Name(s) of IMAP mailboxes to split mail from.
  (setq nnimap-inbox "INBOX")           ; Necessary for splitting under 24.5.

  ;; The first match in `nnmail-split-rule' found will be used.
  (setq nnmail-crosspost nil)

  ;; BBDB (Big Brother DataBase) is loaded from my `.emacs' file.
  (when (try-require 'bbdb-gnus)

    ;; Split function to use (sorting mails into groups using BBDB).
    (setq nnimap-split-methods 'nnimap-split-fancy)

    ;; Specify how to split mail.
    (setq nnimap-split-fancy            ; XXX vs `nnmail-split-fancy'?
          '(|                           ; Split to the *first* match.

              ;; Mailing lists (in To: or Cc:).
              (to "foo@bar\\.com" "list.foo")

              ;; Invoke BBDB.
              (: (lambda ()
                   (car (bbdb/gnus-split-method))))

              ;; Catch spam.
              ("X-Spam-Status" "[Yy]es"
               "INBOX.Spam")

              ;; Unmatched mail goes to the catch-all group (default mailbox).
              "INBOX"))                 ; Undecided.

    ;; For records which don't have `gnus-private' set, the rules in
    ;; `split-fancy' are invoked.
    (setq bbdb/gnus-split-default-group nil))
--8<---------------cut here---------------end--------------->8---


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

* bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
       [not found]           ` <868uckoi50.fsf-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>
  2015-05-21 11:51             ` Sebastien Vauban
@ 2015-07-24 14:49             ` Sebastien Vauban
  1 sibling, 0 replies; 10+ messages in thread
From: Sebastien Vauban @ 2015-07-24 14:49 UTC (permalink / raw)
  To: 20610-ubl+/3LiMTaZdePnXv/OxA

solved
close

Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org> writes:
> Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org> writes:
>> Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org> writes:
>>> Katsumi Yamaoka <yamaoka-NvgVpDro27E@public.gmane.org> writes:
>>>> On Tue, 19 May 2015 14:39:29 -0400, Stefan Monnier wrote:
>>>>> I think we need some help from the Gnus guys here,
>>>>
>>>> (featurep 'bbdb-gnus) ;; Type `C-j' at the end of the form.
>>>
>>> It _is_ loaded; it returns `t'.  [...]  Both versions of Emacs read my
>>> `~/.gnus' file and load the `bbdb-gnus' library found at
>>> `~/.emacs.d/elpa/bbdb-20140830.2031/bbdb-gnus.elc'.
>>
>> I'm progressing -- a bit.  I just found out that [...] in Emacs 25.0,
>> _after having started Gnus_, when I type `C-h v nnimap-split-methods',
>> I get `nil'!!!  And similarly for `nnimap-split-fancy'... So, these
>> variables gets reinitialized after my code is run...  How?  Why?
>
> As I still need to read my mails within Emacs 25.0, and as the fancy
> mail splitting still does not work for me there (while it does, with
> the same config file, within Emacs 24.5), I have done more tests [...]
>
>   ;; Configure incoming mail.
>   (setq gnus-select-method
>         '(nnimap "mail"
>                  (nnimap-address "mail")
>                  (nnimap-server-port 993)
>                  (nnimap-stream ssl)))

Putting *both* `nnimap-inbox' and `nnimap-split-methods' in the
definition of the IMAP select method is *necessary* for fancy splitting
to work under Emacs 25.

Working example:

--8<---------------cut here---------------start------------->8---
    ;; Configure incoming mail.
    (setq gnus-select-method
          '(nnimap "mail"
                   (nnimap-address "mail")
                   (nnimap-server-port 993)
                   (nnimap-stream ssl)
                   (nnimap-inbox "INBOX")
                   (nnimap-split-methods nnmail-split-fancy)))
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb





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

* bug#20610: 25.1.1 Gnus fancy mail splitting not working anymore
  2015-05-19 12:40 bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore Sebastien Vauban
  2015-05-19 17:35 ` Stefan Monnier
@ 2016-10-14 10:33 ` Gijs Hillenius
  1 sibling, 0 replies; 10+ messages in thread
From: Gijs Hillenius @ 2016-10-14 10:33 UTC (permalink / raw)
  To: 20610


Trying out Debian's Emacs25, (GNU Emacs 25.1.1 (x86_64-pc-linux-gnu,
GTK+ Version 3.22.1) of 2016-10-11, modified by Debian)

I notice that my fancy split using bbdb is no longer working, similar to
what Sebastien Vauban noticed last year.

In the server buffer, this is how the mail server is configured

(nnimap "thuis"
	(nnimap-address "server")
	(nnimap-inbox "INBOX")
	(nnimap-split-methods nnimap-split-fancy)
	(nnimap-unsplittable-articles
	 '(%Deleted %Seen))
	(nnir-search-engine imap)
	(nnimap-stream tls))

Which works in Emacs24.

here is a shortened version of my nnimap-split-fancy

(setq nnimap-split-fancy
      '(| 
       	("from" "stuff.*" "INBOX.stuff")
	("from" "no-reply@stuff" "INBOX.tmp")
	;; Invoke the BBDB
	(: (lambda ()
	     (car (bbdb/gnus-split-method))))
	;; Default mailbox
	"INBOX"))


The difference with Sebastian's fix from 24 Jul 2015 is that he uses
nnimap-split-methods nnmail-split-fancy, whereas in my case it is
nnimap-split-fancy.

In Emacs25, nnimap-split-methods is nil
In Emacs24, its value is nnimap-split-fancy

In Emacs25, when I reload Gnus, (r), nnimap-split-fancy gets the
intended value, and splitting works as before. So, somehow, m-x gnus
reads my .gnus file, and then forgets (some parts of) it.

Not sure what to do.. Not sure how to debug this either.

Would appreciate some pointers. Thanks






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

end of thread, other threads:[~2016-10-14 10:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 12:40 bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore Sebastien Vauban
2015-05-19 17:35 ` Stefan Monnier
     [not found]   ` <jwviobojwsf.fsf-monnier+emacsbugs-mXXj517/zsQ@public.gmane.org>
2015-05-19 17:57     ` Sebastien Vauban
2015-05-19 18:39       ` Stefan Monnier
2015-05-20  0:22         ` Katsumi Yamaoka
     [not found]         ` <mailman.3294.1432081389.904.bug-gnu-emacs@gnu.org>
     [not found]           ` <mailman.3370.1432209128.904.bug-gnu-emacs@gnu.org>
     [not found]             ` <mailman.3370.1432209128.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2015-05-22 21:36               ` Sebastien Vauban
     [not found]             ` <mailman.3483.1432330630.904.bug-gnu-emacs@gnu.org>
2015-07-24 12:46               ` Sebastien Vauban
     [not found]           ` <868uckoi50.fsf-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>
2015-05-21 11:51             ` Sebastien Vauban
2015-07-24 14:49             ` Sebastien Vauban
2016-10-14 10:33 ` bug#20610: 25.1.1 " Gijs Hillenius

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).