> It looks suspicious to me, that the mail-sources settings within > g-s-s-m affect the global value. If I set mail-sources to nil in the > init file, it is overwritten by the value above, so it has no > buffer-local binding. Hm. List elements after the server name (=defs) within an select-method are evaluated (for nnfolder, nnml) in nnoo.el:nnoo-change-server by these lines: (unless (cdr (assoc server (cddr bstate))) (while (setq def (pop defs)) (unless (assq (car def) bvariables) (nconc bvariables (list (cons (car def) (and (boundp (car def)) (symbol-value (car def))))))) (if (equal server "*internal-non-initialized-backend*") (set (car def) (symbol-value (cadr def))) (set (car def) (cadr def))))) 'bvariables' contain a part of 'nnoo-definition-alist' that is related to current backend. Its change will alter nnoo-definition-alist. According to this code, if I specify (setq gnus-secondary-select-methods '((nnfolder "" (mail-sources ((file :plugged t) ; get mail from system mailbox (directory :path "~/Mail/incoming-nnfolder" :suffix "" :plugged t)))) (nnml "" (mail-sources ((directory :path "~/Mail/incoming-nnml" :suffix "" :plugged t)))))) and mail-sources is nil in the beginning, the first call for backend 'nnfolder' will add (list (cons mail-sources nil)) to bvariables. When nnoo-change-server is then called for backend 'nnml', mail-sources has the value that was set by the nnfolder-backend before, therefore (list (cons mail-sources ((file :plugged t)(directory :path...)))) is added to the nnml-part of nnoo-definition-alist: ((nnfolder nil ((nnfolder-* . *) (mail-sources))) (nnml nil ((nnml-* . *) (mail-sources (file :plugged t) (directory :path "~/Mail/incoming-nnfolder" :suffix "" :plugged t)))) (...)) This is not what has been expected. If I understand it right, the intention of the code in nnoo-change-server (listed above) is to provide a means to add variable-value pairs to the list of server variables of a backend. Would it break the design, if mail-sources was handled as server variable too, so that -- depending on backend -- "nn*-mail-sources" could be specified? nndiary, for instance, is using nndiary-mail-sources instead of mail-sources. As an example, the following patch makes nnmail-get-new-mail use -mail-sources rather than mail-sources: ------------------------------------------------------------>8---------- Index: nnmail.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v retrieving revision 6.74 diff -u -p -r6.74 nnmail.el --- nnmail.el 17 Apr 2003 19:01:45 -0000 6.74 +++ nnmail.el 3 May 2003 15:30:23 -0000 @@ -1646,7 +1646,8 @@ See the Info node `(gnus)Fancy Mail Spli (defun nnmail-get-new-mail (method exit-func temp &optional group spool-func) "Read new incoming mail." - (let* ((sources (or mail-sources + (let* ((sources (or (nnmail-get-value "%s-mail-sources" method) + mail-sources (if (listp nnmail-spool-file) nnmail-spool-file (list nnmail-spool-file)))) fetching-sources ----------8<------------------------------------------------------------ It seems to work, if I change mail-sources to nnfolder-mail-sources resp. nnml-mail-sources in my g-s-s-m definition. This would also allow the use of a global mail-sources with, for instance, a different one for backend 'nnfolder'.