From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/16069 Path: main.gmane.org!not-for-mail From: Mike McEwan Newsgroups: gmane.emacs.gnus.general Subject: `M-g' when `nntp-server-list-active-group' is nil Date: 15 Aug 1998 13:06:11 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035155000 25653 80.91.224.250 (20 Oct 2002 23:03:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:03:20 +0000 (UTC) Return-Path: Original-Received: from gwyn.tux.org (gwyn.tux.org [207.96.122.8]) by altair.xemacs.org (8.9.1/8.9.1) with ESMTP id FAA15678 for ; Sat, 15 Aug 1998 05:19:47 -0700 Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by gwyn.tux.org (8.8.8/8.8.8) with ESMTP id IAA13530 for ; Sat, 15 Aug 1998 08:13:33 -0400 Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id GAT18126; Sat, 15 Aug 1998 06:44:25 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 15 Aug 1998 07:12:43 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id HAA24434 for ; Sat, 15 Aug 1998 07:12:36 -0500 (CDT) Original-Received: from post.mail.demon.net (post-20.mail.demon.net [194.217.242.27]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id IAA23045 for ; Sat, 15 Aug 1998 08:12:28 -0400 (EDT) Original-Received: from (lotusland.demon.co.uk) [158.152.62.156] by post.mail.demon.net with smtp (Exim 1.82 #2) id 0z7fC5-0003Qn-00; Sat, 15 Aug 1998 12:12:25 +0000 Original-Received: from mike by lotusland.demon.co.uk with local (Exim 2.02 #1) id 0z7fC4-0000aR-00 for ding@gnus.org; Sat, 15 Aug 1998 13:12:24 +0100 Original-To: ding@gnus.org X-Mailer: Gnus v5.6.36/XEmacs 20.4 - "Emerald" Original-Lines: 61 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:16069 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:16069 Well I thought I'd be able to download articles for individual groups and have their `active' files saved accross sesions when I read: "* gnus-group.el (gnus-group-get-new-news-this-group): Store active info." However, me being awkward with `nntp-server-list-active-group' set to `nil' (my isp's news-server seems to have a noticeable lag in updating its active file) , my "agent.lib/groups" file was still not being updated after a `M-g' in the group buffer. The following patch rectifies the situation: diff -u ChangeLog.orig ChangeLog --- ChangeLog.orig 1998/08/15 08:24:01 +++ ChangeLog 1998/08/15 11:35:17 @@ -1,3 +1,8 @@ +1998-08-15 Mike McEwan + + * gnus-agent.el (gnus-agent-save-group-info): Update "groups" file + if `nntp-server-list-active-group' is nil. + Fri Aug 14 23:03:51 1998 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.6.36 is released. diff -u gnus-agent.el.orig gnus-agent.el --- gnus-agent.el.orig 1998/08/15 08:34:05 +++ gnus-agent.el 1998/08/15 11:09:11 @@ -532,16 +532,24 @@ (defun gnus-agent-save-group-info (method group active) (when (gnus-agent-method-p method) (let* ((gnus-command-method method) - (file (gnus-agent-lib-file "active"))) + (file (if nntp-server-list-active-group + (gnus-agent-lib-file "active") + (gnus-agent-lib-file "groups")))) (gnus-make-directory (file-name-directory file)) (nnheader-temp-write file (when (file-exists-p file) (insert-file-contents file)) (goto-char (point-min)) - (when (re-search-forward (concat "^" (regexp-quote group) " ") nil t) - (gnus-delete-line)) - (insert group " " (number-to-string (cdr active)) " " - (number-to-string (car active)) "\n"))))) + (if nntp-server-list-active-group + (progn + (when (re-search-forward (concat "^" (regexp-quote group) " ") nil t) + (gnus-delete-line)) + (insert group " " (number-to-string (cdr active)) " " + (number-to-string (car active)) "\n")) + (progn + (when (re-search-forward (concat (regexp-quote group) " ") nil t) + (gnus-delete-line)) + (insert-buffer-substring nntp-server-buffer))))))) (defun gnus-agent-group-path (group) "Translate GROUP into a path." -- Mike.