unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: Katsumi Yamaoka <yamaoka-NvgVpDro27E@public.gmane.org>,
	Stefan Monnier <monnier-CRDzTM1onBSWkKpYnGOUKg@public.gmane.org>
Cc: 20610-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org
Subject: bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore
Date: Fri, 22 May 2015 23:36:23 +0200	[thread overview]
Message-ID: <86vbfkpa5k.fsf@example.com> (raw)
In-Reply-To: <mailman.3370.1432209128.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org> (Sebastien Vauban's message of "Thu, 21 May 2015 13:51:12 +0200")

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





  parent reply	other threads:[~2015-05-22 21:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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]           ` <868uckoi50.fsf-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>
2015-05-21 11:51             ` Sebastien Vauban
2015-07-24 14:49             ` Sebastien Vauban
     [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 [this message]
     [not found]             ` <mailman.3483.1432330630.904.bug-gnu-emacs@gnu.org>
2015-07-24 12:46               ` Sebastien Vauban
2016-10-14 10:33 ` bug#20610: 25.1.1 " Gijs Hillenius

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86vbfkpa5k.fsf@example.com \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=20610-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org \
    --cc=monnier-CRDzTM1onBSWkKpYnGOUKg@public.gmane.org \
    --cc=yamaoka-NvgVpDro27E@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.
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).