Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: automatic Agentizing of servers (was: Summary buffer
Date: Mon, 29 Dec 2003 22:39:01 +0100	[thread overview]
Message-ID: <ilu7k0ftibu.fsf@latte.josefsson.org> (raw)
In-Reply-To: <877k0fwc8i.fsf@doohan.bang.priv.no> (Steinar Bang's message of "Mon, 29 Dec 2003 22:22:21 +0100")

Steinar Bang <sb@dod.no> writes:

>>>>>> Simon Josefsson <jas@extundo.com>:
>
>> And gnus-agent-covered-methods should be read from
>> ~/News/agent/lib/servers.  So only when g-a-c-m is nil should the
>> auto agentizing happen.  Hm.  I guess if you deagentize all your
>> servers, they would be auto-agentized again.  But if no servers are
>> agentized, what's the point if using the agent?
>
> I may wish to switch it on again for a server, without having to touch
> the configuration file.

I agree.

>> Perhaps it should disable itself in that case.
>
> This was never resolved...?
>
> I did a CVS update yesterday for the first time since October, and
> encountered the auto-agentizing behaviour, and didn't like it.

I have installed the following.  I did test it slightly, but please
verify if it works.

2003-12-29  Simon Josefsson  <jas@extundo.com>

	* gnus-agent.el (gnus-agentize): Improve auto-agentizing logic.
	Suggested by Steinar Bang <sb@dod.no>.

Index: gnus-agent.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-agent.el,v
retrieving revision 6.183
diff -u -p -u -w -r6.183 gnus-agent.el
--- gnus-agent.el	21 Dec 2003 15:42:11 -0000	6.183
+++ gnus-agent.el	29 Dec 2003 21:36:59 -0000
@@ -608,7 +608,11 @@ minor mode in all Gnus buffers."
               message-send-mail-function)
 	  message-send-mail-real-function 'gnus-agent-send-mail))
 
-  (unless gnus-agent-covered-methods
+  ;; If the servers file doesn't exist, auto-agentize some servers and
+  ;; save the servers file so this auto-agentizing isn't invoked
+  ;; again.
+  (unless (file-exists-p (nnheader-concat gnus-agent-directory "lib/servers"))
+    (gnus-message 3 "First time agent user, agentizing remote groups...")
     (mapc
      (lambda (server-or-method)
        (let ((method (gnus-server-to-method server-or-method)))
@@ -617,7 +621,8 @@ minor mode in all Gnus buffers."
            (push (gnus-method-to-server method)
                  gnus-agent-covered-methods)
            (setq gnus-agent-method-p-cache nil))))
-     (cons gnus-select-method gnus-secondary-select-methods))))
+     (cons gnus-select-method gnus-secondary-select-methods))
+    (gnus-agent-write-servers)))
 
 (defun gnus-agent-queue-setup (&optional group-name)
   "Make sure the queue group exists.




  reply	other threads:[~2003-12-29 21:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-24 15:14 Summary buffer highlighting Emerick Rogul
2003-11-24 16:17 ` automatic Agentizing of servers (was: Summary buffer highlighting) Ted Zlatanov
2003-11-24 16:42   ` automatic Agentizing of servers (was: Summary buffer Emerick Rogul
2003-11-24 16:47   ` Kevin Greiner
2003-11-24 17:05     ` Emerick Rogul
2003-11-24 17:07     ` Ted Zlatanov
2003-11-25  2:48       ` Kevin Greiner
2003-11-25  8:25         ` Simon Josefsson
2003-11-25 18:31           ` Ted Zlatanov
2003-12-29 21:22           ` Steinar Bang
2003-12-29 21:39             ` Simon Josefsson [this message]
2003-12-29 21:58               ` Steinar Bang
2003-12-29 22:23                 ` Steinar Bang
2003-12-29 22:27                   ` Steinar Bang
2003-12-29 22:36                     ` Steinar Bang
2003-12-29 22:33                 ` Simon Josefsson
2003-12-29 22:44                   ` Steinar Bang
2003-12-29 23:00                     ` Simon Josefsson
2003-12-29 23:10                       ` Kevin Greiner
2003-12-29 23:17                         ` Simon Josefsson
2003-12-29 23:37                           ` Kevin Greiner
2003-12-29 23:53                             ` Simon Josefsson
2003-12-30  2:19                               ` Harry Putnam
2003-12-30  9:44                                 ` Steinar Bang
2003-12-30 11:16                                 ` Simon Josefsson
2003-12-30 20:55                                   ` Steinar Bang
2003-12-30 21:30                                     ` Simon Josefsson
2003-12-30 22:49                                       ` Harry Putnam
2003-12-31 12:55                                       ` Steinar Bang
2003-12-30  9:40                       ` Steinar Bang

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=ilu7k0ftibu.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    /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).