From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastien Vauban Newsgroups: gmane.emacs.bugs Subject: Re: bug#20610: 25.0.50; Gnus fancy mail splitting not working anymore Date: Fri, 24 Jul 2015 14:46:42 +0200 Organization: Sebastien Vauban Message-ID: <86pp3hvi31.fsf@missioncriticalit.com> References: <868uckoi50.fsf@example.com> <86oalglaas.fsf@example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1437745119 17531 80.91.229.3 (24 Jul 2015 13:38:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jul 2015 13:38:39 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 24 15:38:33 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ZIdBI-0002sl-2T for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jul 2015 15:38:32 +0200 Original-Received: from localhost ([::1]:45226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIdBH-0005pe-Cl for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jul 2015 09:38:31 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!newsfeed.kamp.net!newsfeed.kamp.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 203 Injection-Info: mx02.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="29976"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vwjvERjRmRo3s7VoNZW3w" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) X-Url: Under construction... Cancel-Lock: sha1:m7RDCa/WEsmvOSPTclBSeye3GtM= sha1:ZVzb1XFJ6pibaGBaa+E5ssZFmv0= Original-Xref: usenet.stanford.edu gnu.emacs.bug:131049 X-Mailman-Approved-At: Fri, 24 Jul 2015 09:38:27 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105105 Archived-At: Sebastien Vauban writes: > Sebastien Vauban writes: >> Katsumi Yamaoka 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 ... 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 ... %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 ... 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 ... 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 ... 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 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 ... 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 ... %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 ... 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---