Gnus development mailing list
 help / color / mirror / Atom feed
From: "Michael Teichgräber" <mt@wmipf.in-berlin.de>
Subject: Re: mail-sources backend specific?
Date: Sun, 04 May 2003 04:40:59 +0200	[thread overview]
Message-ID: <87r87fph6s.fsf@wmipf.in-berlin.de> (raw)
In-Reply-To: <847k97zr1k.fsf@lucy.is.informatik.uni-duisburg.de>

kai.grossjohann@gmx.net (Kai Großjohann) writes:

> But what happens if you have two nnml backends and in both you set a
> variable (a parameter?) nnml-foo?  Then the first can influence the
> second in the same way, no?

In such a case you would choose a different server name (instead of
"") for the second backend, wouldn't you? So there wouldn't be a
problem.

(If you use the Agent, you already are using multiple nnml backends.)


> Is there a more serious bug here?

No, it works very well. ;-)

From what I have learned so far, each backend has a current
server. There are global variables nn<backend>-* that represent the
settings of this current server. These variables coexist with nn*-*
variables of other backends without problems because of different
"nn*-" prefixes.

If the server changes for a certain backend foo from current server
bar to new server baz (e.g. to read mail from baz now),
nnoo-push-server stores all global variables nnfoo-* (that have an
entry in nnoo-definition-alist) into the sub-list within
nnoo-state-alist that corresponds to bar. Then the values of server
baz are extracted from nnoo-state-alist and stored into the global
variables nnfoo-*.

Since global variables of current backend-server pairs must
coexist (they do if being prefixed properly), ...

>>>> <alternative approach>
>>> But OTOH, server variables may be useful for other things, so what do
>>> you think about fixing the server variable handling?
>>
>> [...]
>
> What I meant is to make 

> (setq gnus-secondary-select-methods
>       '((nnfolder "" (mail-sources foo))
>         (nnml "" (mail-sources bar))))
>
> behave as you (and I) desire: fetch mail from foo for the nnfolder
> backend and from bar for the nnml backend.

... ^^^ this will be difficult to achieve, as there cannot be
different "mail-sources" variables in the same (global) namespace. :-(


> Maybe it's enough to make the variables local to the current buffer?
> But probably it isn't -- Gnus jumps around the buffers a lot.

Even if servers were changed only in the Group buffer, there still
would be the problem of variables of current backend-server pairs
having to coexist.


But, nnoo-change-server could be extended to automagically
provide proper prefixes for variable names that do not start with
"nn[^-]+-". A "mail-sources" would then be translated to
"nnfolder-mail-sources" for backend "nnfolder". This would allow the
init file to look like

------------------------------------------------------------>8----------
(setq gnus-secondary-select-methods
      '((nnfolder ""
                  (mail-sources ((file :plugged t)
                                 (directory :path "~/Mail/incoming-nnfolder"
                                            :suffix ""
                                            :plugged t)))
                  (directory "~/Mail/nnfolder")
                  (active-file "~/Mail/nnfolder/active")
                  (get-new-mail t))

        (nnml ""
              (mail-sources ((directory :path "~/Mail/incoming-nnml"
                                        :suffix ""
                                        :plugged t)))
              (directory "~/Mail/nnml")
              (active-file "~/Mail/nnml/active")
              (get-new-mail t)))))
----------8<------------------------------------------------------------

The same for gnus-message-archive-method. If have tested this with a
patch to nnoo.el, and it seems to work (it's practically the same as
specifying nnfolder- resp. nnml-).

Opinions?



  reply	other threads:[~2003-05-04  2:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-27 12:22 Using different backends Andreas Jaeger
2003-04-27 15:25 ` Kai Großjohann
2003-04-27 19:06   ` Andreas Jaeger
2003-05-02 13:03     ` Michael Teichgräber
2003-05-02 13:30       ` Kai Großjohann
2003-05-02 14:26         ` Michael Teichgräber
2003-05-02 14:47           ` Kai Großjohann
2003-05-02 15:15             ` Michael Teichgräber
2003-05-03 15:51               ` mail-sources backend specific? (was: Using different backends) Michael Teichgräber
2003-05-03 17:25                 ` mail-sources backend specific? Kai Großjohann
2003-05-03 20:00                   ` Michael Teichgräber
2003-05-03 20:57                     ` Kai Großjohann
2003-05-04  2:40                       ` Michael Teichgräber [this message]
2003-05-04 13:29                         ` Kai Großjohann
2003-05-05 16:38                           ` Paul Jarc
2003-05-06 16:31                             ` Kai Großjohann
2003-05-06 19:55                               ` Paul Jarc
2003-05-29 14:27                                 ` Kai Großjohann
2003-05-29 16:14                                   ` Paul Jarc
2003-10-18 12:53                                     ` Lars Magne Ingebrigtsen
2003-05-03 17:21               ` Using different backends Kai Großjohann
2003-05-03 19:00                 ` Michael Teichgräber
2003-05-03 20:00                   ` Kai Großjohann
2003-04-28 18:58 ` Paul Jarc
2003-04-29  5:45   ` Andreas Jaeger
2003-04-29 15:23     ` Paul Jarc

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

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

  git send-email \
    --in-reply-to=87r87fph6s.fsf@wmipf.in-berlin.de \
    --to=mt@wmipf.in-berlin.de \
    /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.
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).