From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45277 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?q?Bj=F8rn?= Mork Newsgroups: gmane.emacs.gnus.general Subject: Re: Server variables in ~/News/agent/lib/servers Date: Mon, 17 Jun 2002 11:09:11 +0200 Organization: Delivery ostrich Death Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1024305069 32228 127.0.0.1 (17 Jun 2002 09:11:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 17 Jun 2002 09:11:09 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17JsXU-0008Nh-00 for ; Mon, 17 Jun 2002 11:11:09 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17JsVy-00038d-00; Mon, 17 Jun 2002 04:09:34 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 17 Jun 2002 04:09:52 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id EAA04752 for ; Mon, 17 Jun 2002 04:09:36 -0500 (CDT) Original-Received: (qmail 3073 invoked by alias); 17 Jun 2002 09:09:12 -0000 Original-Received: (qmail 3068 invoked from network); 17 Jun 2002 09:09:12 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 17 Jun 2002 09:09:12 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17Jsvh-0003yC-00 for ; Mon, 17 Jun 2002 11:36:09 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 77 Original-NNTP-Posting-Host: 148.122.193.44.dhcp.nextra.no Original-X-Trace: quimby.gnus.org 1024306569 15128 148.122.193.44 (17 Jun 2002 09:36:09 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 17 Jun 2002 09:36:09 GMT User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu) Cancel-Lock: sha1:Z0sK5txaoet79WP8duEaBXUpubQ= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45277 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45277 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Simon Josefsson writes: > Bjørn Mork writes: > >> It's your primary select method. It's collapsed to nil by >> gnus-method-simplify. Try removing it from agent and you'll see that >> the nil disappears. > > Aha. Hm. If I make my primary server a secondary server, this > breaks, does it not? Yes. Didn't know that was a common operation. I still have some problems being open-minded enough regarding what people want to do with Gnus :-) Doesn't this also break other things, like group subscribtions? > Moving servers around between primary, > secondary, archive etc works OK, I believe, so how about expanding > even the primary server as a string? Then the "m" native hack > wouldn't be needed, I think. Would this do something else bad? Can't imagine so. I've attached an attempt, but it got slightly ugly... Bjørn -- Save the diseases! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=agent-servers.diff Index: lisp/gnus-agent.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-agent.el,v retrieving revision 6.73 diff -u -r6.73 gnus-agent.el --- lisp/gnus-agent.el 2002/06/16 21:13:49 6.73 +++ lisp/gnus-agent.el 2002/06/17 09:28:32 @@ -628,10 +628,7 @@ (defun gnus-agent-read-servers () "Read the alist of covered servers." (setq gnus-agent-covered-methods - (mapcar (lambda (m) - (gnus-server-get-method - nil - (or m "native"))) + (mapcar 'gnus-server-get-method (gnus-agent-read-file (nnheader-concat gnus-agent-directory "lib/servers"))))) @@ -641,7 +638,16 @@ (let ((coding-system-for-write nnheader-file-coding-system) (file-name-coding-system nnmail-pathname-coding-system)) (with-temp-file (nnheader-concat gnus-agent-directory "lib/servers") - (prin1 (mapcar 'gnus-method-simplify gnus-agent-covered-methods) + (prin1 (mapcar (lambda (m) + (cond ((stringp m) + m) + ((or + (gnus-native-method-p m) + (gnus-secondary-method-p m)) + (format "%s:%s" (nth 0 m) (nth 1 m))) + (t + m))) + gnus-agent-covered-methods) (current-buffer))))) ;;; --=-=-=--