Gnus development mailing list
 help / color / mirror / Atom feed
* nnml pseudo-agentized?
@ 2003-04-30  7:24 Kai Großjohann
  2003-04-30 13:21 ` Kevin Greiner
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2003-04-30  7:24 UTC (permalink / raw)


This morning, when I was sitting in the train, Gnus couldn't open the
nnml server.  It seems that the nnml server is denied when Gnus is
unplugged.  I can still read nnml when plugged, though.

-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)



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

* Re: nnml pseudo-agentized?
  2003-04-30  7:24 nnml pseudo-agentized? Kai Großjohann
@ 2003-04-30 13:21 ` Kevin Greiner
  2003-04-30 16:32   ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Greiner @ 2003-04-30 13:21 UTC (permalink / raw)


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

> This morning, when I was sitting in the train, Gnus couldn't open the
> nnml server.  It seems that the nnml server is denied when Gnus is
> unplugged.  I can still read nnml when plugged, though.

I just fixed a bug in gnus-open-server.  If you debug it, you should
be able to see what is going wrong.  I suspect that the new code
doesn't understand that some backends are always plugged since they
don't require network connections.

In fact, I believe that the change should be at the '(not
gnus-plugged)' condition.  One fix would be to change it to 
"(not (or gnus-plugged (memq (car gnus-command-method) '(nnml))))".
Seems simple except that I don't know which backends go into the list
with nnml.

I'm going to be travelling much of today.  Kai please make this, or a
similar, change to get this working.

Kevin



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

* Re: nnml pseudo-agentized?
  2003-04-30 13:21 ` Kevin Greiner
@ 2003-04-30 16:32   ` Kai Großjohann
  2003-04-30 21:42     ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2003-04-30 16:32 UTC (permalink / raw)


Kevin Greiner <kgreiner@xpediantsolutions.com> writes:

> I just fixed a bug in gnus-open-server.  If you debug it, you should
> be able to see what is going wrong.  I suspect that the new code
> doesn't understand that some backends are always plugged since they
> don't require network connections.
>
> In fact, I believe that the change should be at the '(not
> gnus-plugged)' condition.  One fix would be to change it to 
> "(not (or gnus-plugged (memq (car gnus-command-method) '(nnml))))".
> Seems simple except that I don't know which backends go into the list
> with nnml.

Your analysis is right.  I applied the enclosed patch and then I
could successfully open the server.

However, I don't think that this is the right approach.  I've been
thinking about it, and I think the key is that my nnml server isn't
agentized, so IMVHO gnus-open-server should open it anyway.

Consider somebody running a Leafnode or Hamster on their machine:
they would abstain from agentizing the server, and then Gnus should
connect to the server.  Even though the server is nntp, and thus
requires network connectivity, and thus isn't mentioned in the list.

Hm.  Let me change the condition to check gnus-agent-covered-methods
and see if it still works.

Yep.  It seems to work.  At least I could open the server.

Testing...  Ah!  I can hit `g', and enter an nnml group.  So this
seems to be the right patch.

For reference, here is the patch that looks whether the method
requires network connectivity:

--- gnus-int.el.~6.30.~	Wed Apr 30 06:03:16 2003
+++ gnus-int.el	Wed Apr 30 18:22:41 2003
@@ -207,16 +207,18 @@
           ((eq (nth 1 state) 'offline)
            ;; If this method was previously opened offline, we just return t.
            t)
-          ((not gnus-plugged)
+          ((and (not gnus-plugged)
+		(not (memq (car gnus-command-method)
+			   '(nnml nnfolder nnmh))))
            ;; I'm opening servers while unplugged.  Set the status to
            ;; either 'offline or 'denied without asking (I'm assuming
            ;; that the user wants to go 'offline on every agentized
            ;; server when opening while unplugged.)
            (setcar (cdr state) (if (and gnus-agent
-                                       (gnus-agent-method-p gnus-command-method))
-                                  (or gnus-server-unopen-status
-                                      'offline)
-                                'denied))
+					(gnus-agent-method-p gnus-command-method))
+				   (or gnus-server-unopen-status
+				       'offline)
+				 'denied))
            
            (if (eq (nth 1 state) 'offline)
                ;; Invoke the agent's backend to open the offline server.


And here is the patch that I'm currently using:

--- gnus-int.el.~6.30.~	Wed Apr 30 06:03:16 2003
+++ gnus-int.el	Wed Apr 30 18:27:25 2003
@@ -207,16 +207,18 @@
           ((eq (nth 1 state) 'offline)
            ;; If this method was previously opened offline, we just return t.
            t)
-          ((not gnus-plugged)
+          ((and (not gnus-plugged)
+		(member gnus-command-method
+			gnus-agent-covered-methods))
            ;; I'm opening servers while unplugged.  Set the status to
            ;; either 'offline or 'denied without asking (I'm assuming
            ;; that the user wants to go 'offline on every agentized
            ;; server when opening while unplugged.)
            (setcar (cdr state) (if (and gnus-agent
-                                       (gnus-agent-method-p gnus-command-method))
-                                  (or gnus-server-unopen-status
-                                      'offline)
-                                'denied))
+					(gnus-agent-method-p gnus-command-method))
+				   (or gnus-server-unopen-status
+				       'offline)
+				 'denied))
            
            (if (eq (nth 1 state) 'offline)
                ;; Invoke the agent's backend to open the offline server.


I propose to install the patch that I'm currently using.  I will
commit it when I'm back online, but I'm sitting in the train at the
moment, and will go out tonight.  It's 18:30 here (= 16:30 UTC) and I
don't expect that this will get sent before 22:00 (= 20:00 UTC).  The
commit will have to wait for tomorrow, I'm afraid.


Thanks, Kevin, for pointing out what needs to be done.  Gnus is so
cool after your Agent changes!  I'm happy it works again.

-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)



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

* Re: nnml pseudo-agentized?
  2003-04-30 16:32   ` Kai Großjohann
@ 2003-04-30 21:42     ` Kai Großjohann
  2003-05-01  7:05       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2003-04-30 21:42 UTC (permalink / raw)


I've now committed the fix that opens unagentized servers even when
unplugged.

I hope it was the right thing to do.  Only 20 minutes to go till May
1st...
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)



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

* Re: nnml pseudo-agentized?
  2003-04-30 21:42     ` Kai Großjohann
@ 2003-05-01  7:05       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-05-01  7:05 UTC (permalink / raw)


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

> I've now committed the fix that opens unagentized servers even when
> unplugged.

And I've reverted it to how it looked a couple of revisions ago.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

end of thread, other threads:[~2003-05-01  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-30  7:24 nnml pseudo-agentized? Kai Großjohann
2003-04-30 13:21 ` Kevin Greiner
2003-04-30 16:32   ` Kai Großjohann
2003-04-30 21:42     ` Kai Großjohann
2003-05-01  7:05       ` Lars Magne Ingebrigtsen

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