Gnus development mailing list
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Subject: Re: mail-sources backend specific?
Date: Mon, 05 May 2003 12:38:08 -0400	[thread overview]
Message-ID: <m34r49pcvt.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <84el3eet60.fsf@lucy.is.informatik.uni-duisburg.de> (Kai =?iso-8859-1?q?Gro=DFjohann's?= message of "Sun, 04 May 2003 15:29:59 +0200")

kai.grossjohann@gmx.net (Kai Großjohann) wrote:
> Suppose you have this situation:
>
> (setq gnus-secondary-select-methods
>       '((nnml "one" (nnml-mail-sources foo))
>         (nnml "two" (nnml-mail-sources bar))))
>
> Clearly there must be a mechanism that prevents the two settings for
> nnml-mail-sources stomping on each other.

Yes: the nnml backend has the notion of a "current server", and only
one setting is in effect at a time.  nnoo is used to set
nnml-mail-sources, according to the server name ("one" or "two").

> So can't this mechanism be used to also protect mail-sources, instead
> of only nnml-mail-sources?

No, because the mechanism is tied to the backend's notion of its
current server.  If two backends are involved, there are two current
servers, so variables must have different names to avoid interference.

nnmaildir does not use nnoo, and its server parameters are not
prefixed with "nnmaildir-".  It does not use global variables to
represent its server parameters.  So there is no problem here:
(setq gnus-secondary-select-methods
      '((nnmaildir "one" (directory "~/one"))
        (nnmaildir "two" (directory "~/two"))))
This works because nnmaildir does not set "directory" as a global
variable; instead, it looks up the string keyed by the symbol
'directory in the select method.  (Actually, the information in the
select method is copied into a more efficient vector, but that's not
important.  The point is that private, anonymous data structures are
used instead of global variables.)  The same could be made to work
with nnoo-derived backends, but they would not be able to refer to
such parameters as if they were global variables.


paul



  reply	other threads:[~2003-05-05 16:38 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
2003-05-04 13:29                         ` Kai Großjohann
2003-05-05 16:38                           ` Paul Jarc [this message]
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=m34r49pcvt.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    /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).