Gnus development mailing list
 help / color / mirror / Atom feed
* Strange server names confusion
@ 2001-09-01 19:06 Kai Großjohann
  2001-09-01 19:39 ` Simon Josefsson
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2001-09-01 19:06 UTC (permalink / raw)


On my IMAP groups, G e says "nnimap:", and on my nnml groups, it says
"nnml:".  nnimap and nnml are secondary select methods in my setup.

But on my foreign nntp groups, G e says "quimby" and "dfn",
respectively, rather than "nntp:quimby" and "nntp:dfn" which I'd
expect.

(Well, _actually_, I set it that way myself, but setting the
with-colon names doesn't work, and setting the sans-colon names
works.)

Isn't this confusing?  What's the story?

kai
-- 
Symbol's function definition is void: signature


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-01 19:06 Strange server names confusion Kai Großjohann
@ 2001-09-01 19:39 ` Simon Josefsson
  2001-09-01 21:59   ` Kai Großjohann
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Josefsson @ 2001-09-01 19:39 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> On my IMAP groups, G e says "nnimap:", and on my nnml groups, it says
> "nnml:".  nnimap and nnml are secondary select methods in my setup.
>
> But on my foreign nntp groups, G e says "quimby" and "dfn",
> respectively, rather than "nntp:quimby" and "nntp:dfn" which I'd
> expect.

Foreign groups are identified by the name of the server (car of each
entry in `gnus-server-alist').

`gnus-server-to-method' etc should understand nntp:quimby even if
"quimby" is the name of a foreign nntp server though.

Compare the discussion about the "archive" server recently, this is
the same thing.  The "archive" server looks like a foreign server.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-01 19:39 ` Simon Josefsson
@ 2001-09-01 21:59   ` Kai Großjohann
  2001-09-02  4:54     ` Paul Jarc
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2001-09-01 21:59 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> On my IMAP groups, G e says "nnimap:", and on my nnml groups, it says
>> "nnml:".  nnimap and nnml are secondary select methods in my setup.
>>
>> But on my foreign nntp groups, G e says "quimby" and "dfn",
>> respectively, rather than "nntp:quimby" and "nntp:dfn" which I'd
>> expect.
>
> Foreign groups are identified by the name of the server (car of each
> entry in `gnus-server-alist').

And secondary groups are identified in some other way?

Does this mean I can have two secondary servers with the same name (as
long as the backend is different), but not two foreign servers with
the same name?

> `gnus-server-to-method' etc should understand nntp:quimby even if
> "quimby" is the name of a foreign nntp server though.

Well, I tried to enter "nntp:quimby" (with quotes) after `G e' on the
group, then I tried to enter the group -- no dice.  But with "quimby"
(with quotes), it worked.

> Compare the discussion about the "archive" server recently, this is
> the same thing.  The "archive" server looks like a foreign server.

I didn't understand that discussion, either ;-nature


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-01 21:59   ` Kai Großjohann
@ 2001-09-02  4:54     ` Paul Jarc
  2001-09-02 10:44       ` Kai Großjohann
  0 siblings, 1 reply; 13+ messages in thread
From: Paul Jarc @ 2001-09-02  4:54 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:
> Simon Josefsson <jas@extundo.com> writes:
>> Foreign groups are identified by the name of the server (car of each
>> entry in `gnus-server-alist').
> 
> And secondary groups are identified in some other way?

Here's the story AIUI.  Every select method has a first element (the
backend) and a second element (which you and I might have thought of
as the "name" but which Gnus calls the "address").  Some select
methods (the primary and foreign ones) also have "server names".  The
primary select method's name is "native", and a foreign method's name
is its key in gnus-server-alist.  Secondary select methods do not have
"server names".

gnus-server-to-method maps strings to select methods.  It accepts two
kinds of strings: server names, for methods that have them, and
"backend:address", for all methods.

gnus-method-to-server-name, despite the name, does not map methods to
server names.  It maps methods to server identifications as they would
appear in fully qualified group names - either "backend", if the
address is "", or "backend+address".

> Does this mean I can have two secondary servers with the same name (as
> long as the backend is different), but not two foreign servers with
> the same name?

You can have two servers of any kind with the same "address" if they
have different backends.  You cannot have two servers of any kind with
the same "name".  I think.

> Well, I tried to enter "nntp:quimby" (with quotes) after `G e' on the
> group, then I tried to enter the group -- no dice.  But with "quimby"
> (with quotes), it worked.

I think "nntp:quimby.gnus.org" would work, assuming "quimby.gnus.org"
is the second element of your select method.


paul


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-02  4:54     ` Paul Jarc
@ 2001-09-02 10:44       ` Kai Großjohann
  2001-09-02 23:13         ` Paul Jarc
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2001-09-02 10:44 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:
> > Simon Josefsson <jas@extundo.com> writes:
>>> Foreign groups are identified by the name of the server (car of each
>>> entry in `gnus-server-alist').
>> 
>> And secondary groups are identified in some other way?
>
> Here's the story AIUI.  Every select method has a first element (the
> backend) and a second element (which you and I might have thought of
> as the "name" but which Gnus calls the "address").  Some select
> methods (the primary and foreign ones) also have "server names".  The
> primary select method's name is "native", and a foreign method's name
> is its key in gnus-server-alist.  Secondary select methods do not have
> "server names".

Is there a way for a foreign server to have a different name than
address using the `normal' Gnus functions?  Or do I have to frob
gnus-server-alist directly for that?

>> Does this mean I can have two secondary servers with the same name (as
>> long as the backend is different), but not two foreign servers with
>> the same name?
>
> You can have two servers of any kind with the same "address" if they
> have different backends.  You cannot have two servers of any kind with
> the same "name".  I think.

Okay, I think I got that.  Since secondary servers don't have names,
it's not a problem to have both (nnml "" ...) and (nnimap ""...).

>> Well, I tried to enter "nntp:quimby" (with quotes) after `G e' on the
>> group, then I tried to enter the group -- no dice.  But with "quimby"
>> (with quotes), it worked.
>
> I think "nntp:quimby.gnus.org" would work, assuming "quimby.gnus.org"
> is the second element of your select method.

I have the following entry in gnus-server-alist:

("quimby" nntp "quimby" (nntp-address "news.gnus.org"))

I think that this means that both the name and the address are
"quimby".  Therefore, "nntp:quimby" should work.  But it doesn't, only
"quimby" works.

Or are you saying that with the above entry, "nntp:news.gnus.org"
should work?  Whee...

kai
-- 
Symbol's function definition is void: signature


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-02 10:44       ` Kai Großjohann
@ 2001-09-02 23:13         ` Paul Jarc
  2001-09-03  8:23           ` Simon Josefsson
  2001-09-03 10:21           ` Kai Großjohann
  0 siblings, 2 replies; 13+ messages in thread
From: Paul Jarc @ 2001-09-02 23:13 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:
> Is there a way for a foreign server to have a different name than
> address using the `normal' Gnus functions?

When you create the server, Gnus asksk you for the name.  The string
you give is used for both the name and the address.  But then you can
edit the server to change the address.

> I have the following entry in gnus-server-alist:
> 
> ("quimby" nntp "quimby" (nntp-address "news.gnus.org"))
> 
> I think that this means that both the name and the address are
> "quimby".  Therefore, "nntp:quimby" should work.  But it doesn't, only
> "quimby" works.

I think that means that either I've misunderstood and misexplained
things, or there's a bug in Gnus.  Try this:
(eq (gnus-server-to-method "quimby") (gnus-server-to-method "nntp:quimby"))
If they are eq, then presumably Gnus is using something other than
gnus-server-to-method to interpret the server names in group infos -
maybe this is a bug.  If they are not eq, then I've misunderstood
something.

> Or are you saying that with the above entry, "nntp:news.gnus.org"
> should work?  Whee...

No, I wouldn't expect that to work.


paul


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-02 23:13         ` Paul Jarc
@ 2001-09-03  8:23           ` Simon Josefsson
  2001-09-03 14:17             ` Kai Großjohann
  2001-09-04  0:05             ` Paul Jarc
  2001-09-03 10:21           ` Kai Großjohann
  1 sibling, 2 replies; 13+ messages in thread
From: Simon Josefsson @ 2001-09-03  8:23 UTC (permalink / raw)
  Cc: ding

On Sun, 2 Sep 2001, Paul Jarc wrote:

> > ("quimby" nntp "quimby" (nntp-address "news.gnus.org"))
> >
> > I think that this means that both the name and the address are
> > "quimby".  Therefore, "nntp:quimby" should work.  But it doesn't, only
> > "quimby" works.
>
> I think that means that either I've misunderstood and misexplained
> things, or there's a bug in Gnus.  Try this:
> (eq (gnus-server-to-method "quimby") (gnus-server-to-method "nntp:quimby"))
> If they are eq, then presumably Gnus is using something other than
> gnus-server-to-method to interpret the server names in group infos -
> maybe this is a bug.  If they are not eq, then I've misunderstood
> something.

Don't forget `gnus-method-equal', `gnus-methods-equal-p' etc.  `eq' should
probably not be used for comparing methods, I think.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-02 23:13         ` Paul Jarc
  2001-09-03  8:23           ` Simon Josefsson
@ 2001-09-03 10:21           ` Kai Großjohann
  1 sibling, 0 replies; 13+ messages in thread
From: Kai Großjohann @ 2001-09-03 10:21 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:
> > Is there a way for a foreign server to have a different name than
>> address using the `normal' Gnus functions?
>
> When you create the server, Gnus asksk you for the name.  The string
> you give is used for both the name and the address.  But then you can
> edit the server to change the address.

Ah, of course.

>> I have the following entry in gnus-server-alist:
>> 
>> ("quimby" nntp "quimby" (nntp-address "news.gnus.org"))
>> 
>> I think that this means that both the name and the address are
>> "quimby".  Therefore, "nntp:quimby" should work.  But it doesn't, only
>> "quimby" works.
>
> I think that means that either I've misunderstood and misexplained
> things, or there's a bug in Gnus.  Try this:
> (eq (gnus-server-to-method "quimby") (gnus-server-to-method "nntp:quimby"))
> If they are eq, then presumably Gnus is using something other than
> gnus-server-to-method to interpret the server names in group infos -
> maybe this is a bug.  If they are not eq, then I've misunderstood
> something.

They are eq.

>> Or are you saying that with the above entry, "nntp:news.gnus.org"
>> should work?  Whee...
>
> No, I wouldn't expect that to work.
>
>
> paul
>

kai
-- 
Symbol's function definition is void: signature


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-03  8:23           ` Simon Josefsson
@ 2001-09-03 14:17             ` Kai Großjohann
  2001-09-03 23:04               ` Paul Jarc
  2001-09-04  0:05             ` Paul Jarc
  1 sibling, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2001-09-03 14:17 UTC (permalink / raw)
  Cc: Paul Jarc, ding

Simon Josefsson <jas@extundo.com> writes:

> Don't forget `gnus-method-equal', `gnus-methods-equal-p' etc.  `eq' should
> probably not be used for comparing methods, I think.

Maybe so.  But if the two are eq, how can it happen that Gnus behaves
differently?!?

But maybe Gnus uses gnus-method-equal directly on the two strings?
Hm.  Anyway:

/----
| *** Welcome to IELM ***  Type (describe-mode) for help.
| ELISP> (gnus-method-equal "quimby" "nntp:quimby")
| nil
| ELISP> (gnus-methods-equal-p "quimby" "nntp:quimby")
| *** Eval error ***  Wrong type argument: listp, "quimby"
| ELISP> 
\----

I'm not sure what this means.  But I observe:

/----
| ELISP> (gnus-server-equal "quimby" "nntp:quimby")
| t
\----

Fascinating.

kai
-- 
Symbol's function definition is void: signature


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-03 14:17             ` Kai Großjohann
@ 2001-09-03 23:04               ` Paul Jarc
  2001-09-04 13:44                 ` Kai Großjohann
  0 siblings, 1 reply; 13+ messages in thread
From: Paul Jarc @ 2001-09-03 23:04 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:
> /----
>| *** Welcome to IELM ***  Type (describe-mode) for help.
>| ELISP> (gnus-method-equal "quimby" "nntp:quimby")
>| nil
>| ELISP> (gnus-methods-equal-p "quimby" "nntp:quimby")
>| *** Eval error ***  Wrong type argument: listp, "quimby"
>| ELISP> 
> \----
> 
> I'm not sure what this means.

I think it means they aren't the same method, but this is just because
they aren't methods at all - they're server names...

> /----
>| ELISP> (gnus-server-equal "quimby" "nntp:quimby")
>| t
> \----

... which name the same method.


paul


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-03  8:23           ` Simon Josefsson
  2001-09-03 14:17             ` Kai Großjohann
@ 2001-09-04  0:05             ` Paul Jarc
  1 sibling, 0 replies; 13+ messages in thread
From: Paul Jarc @ 2001-09-04  0:05 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> wrote:
> On Sun, 2 Sep 2001, Paul Jarc wrote:
>>> Therefore, "nntp:quimby" should work.  But it doesn't, only
>>> "quimby" works.
...
>> (eq (gnus-server-to-method "quimby") (gnus-server-to-method "nntp:quimby"))
...
> Don't forget `gnus-method-equal', `gnus-methods-equal-p' etc.  `eq' should
> probably not be used for comparing methods, I think.

Are methods ever copied within Gnus?  I suspect not, which would imply
that if a method is defined in only one place, eq will give correct
results.  In this particular case, I wanted to know if they were the
same object.  If they weren't, then Gnus might be able to deal with
that (because it uses g-m-e or g-m-e-p), but it would still be a sign
that something was odd.  g-m-e and g-m-e-p would return t for two
methods defined the same way in two different places - this is useful
if you want to let users be sloppy, but not necessarily if you're
debugging, or if you're striving to be unsloppy.


paul


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-03 23:04               ` Paul Jarc
@ 2001-09-04 13:44                 ` Kai Großjohann
  2001-09-05  0:55                   ` Paul Jarc
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2001-09-04 13:44 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:
> > /----
>>| *** Welcome to IELM ***  Type (describe-mode) for help.
>>| ELISP> (gnus-method-equal "quimby" "nntp:quimby")
>>| nil
>>| ELISP> (gnus-methods-equal-p "quimby" "nntp:quimby")
>>| *** Eval error ***  Wrong type argument: listp, "quimby"
>>| ELISP> 
>> \----
>> 
>> I'm not sure what this means.
>
> I think it means they aren't the same method, but this is just because
> they aren't methods at all - they're server names...

Well.  Hm.  Ah, a method is always a list.  Okay, then.

So maybe the Gnus source should be searched for rogue occurrences of
gnus-method-equal and gnus-methods-equal-p (what's the difference?).
I'm guessing that Gnus should use gnus-server-equal in most places.
What do you think?

gnus-server-equal accepts servers (server names) as well as methods,
converts the server names to methods, and compares the methods.

kai
-- 
Symbol's function definition is void: signature


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Strange server names confusion
  2001-09-04 13:44                 ` Kai Großjohann
@ 2001-09-05  0:55                   ` Paul Jarc
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Jarc @ 2001-09-05  0:55 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) wrote:
> So maybe the Gnus source should be searched for rogue occurrences of
> gnus-method-equal and gnus-methods-equal-p (what's the difference?).

Well, one is a function, and one is a macro, though it's not clear
why.  gnus-methods-equal-p considers (nnchoke "foo") to be equal to
(nnchoke "foo" (param value)) if nnchoke uses 'address in
gnus-declare-backend.  If it doesn't, then all nnchoke methods are
equal for g-m-e-p.  For gnus-method-equal, two methods are equal when
they have the same backend and following list elements are equal, but
in a possibly different order.  g-m-e-p also interprets nil arguments
as gnus-select-method, unlike g-m-e.

> I'm guessing that Gnus should use gnus-server-equal in most places.
> What do you think?

I'd like it if Gnus were less tolerant of sloppiness.  Then it'd be
harder for users to make a mess of their configurations.  So if a list
is found where a string is expected (or vice versa), there should be a
nice error message telling the user how to fix the problem.


paul


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2001-09-05  0:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-01 19:06 Strange server names confusion Kai Großjohann
2001-09-01 19:39 ` Simon Josefsson
2001-09-01 21:59   ` Kai Großjohann
2001-09-02  4:54     ` Paul Jarc
2001-09-02 10:44       ` Kai Großjohann
2001-09-02 23:13         ` Paul Jarc
2001-09-03  8:23           ` Simon Josefsson
2001-09-03 14:17             ` Kai Großjohann
2001-09-03 23:04               ` Paul Jarc
2001-09-04 13:44                 ` Kai Großjohann
2001-09-05  0:55                   ` Paul Jarc
2001-09-04  0:05             ` Paul Jarc
2001-09-03 10:21           ` Kai Großjohann

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).