From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/31240 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: denying nnimap server causes nnimap-close-group to crash Date: 30 May 2000 14:40:15 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035167678 12925 80.91.224.250 (21 Oct 2002 02:34:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:34:38 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by mailhost.sclp.com (Postfix) with ESMTP id 40701D051F for ; Tue, 30 May 2000 08:44:53 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id HAC06171; Tue, 30 May 2000 07:41:17 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 30 May 2000 07:39:59 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id HAA23310 for ; Tue, 30 May 2000 07:39:48 -0500 (CDT) Original-Received: from badis.pdc.kth.se (badis.pdc.kth.se [130.237.221.45]) by mailhost.sclp.com (Postfix) with ESMTP id A6401D051F for ; Tue, 30 May 2000 08:40:10 -0400 (EDT) Original-Received: (from jas@localhost) by badis.pdc.kth.se (8.10.0/8.10.0) id e4UCeGM25676; Tue, 30 May 2000 14:40:16 +0200 Original-To: Steinar Bang In-Reply-To: Steinar Bang's message of "26 May 2000 15:54:02 +0200" Original-Lines: 75 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:31240 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:31240 Steinar Bang writes: > However if I go to the server buffer, and press D on these servers, > and then go back to *Group* and press > g > I end up with the following stack trace: > > Signaling: (wrong-type-argument stringp nil) > set-buffer(nil) > (save-current-buffer (set-buffer nnimap-server-buffer) (when (and ... ...) (case nnimap-expunge-on-close ... ... ...) (not imap-current-mailbox))) > ) > (with-current-buffer nnimap-server-buffer (when (and ... ...) (case nnimap-expunge-on-close ... ... ...) (not imap-current-mailbox))) > ) > nnimap-close-group("INBOX" "somemachine.somecompany.no") > gnus-get-unread-articles(2) > gnus-group-get-new-news(2) > call-interactively(gnus-group-get-new-news) > > Anyone's got an idea what is wrong? Looks like `gnus-get-unread-articles' doesn't care if a server is denied or not. Could you try this patch? 2000-05-30 Simon Josefsson * gnus-start.el (gnus-get-unread-articles): If `gnus-activate-group' and/or `gnus-check-server' return nil, don't try to do anything on that server. Index: gnus-start.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-start.el,v retrieving revision 5.54 diff -w -u -u -w -r5.54 gnus-start.el --- gnus-start.el 2000/05/23 08:09:24 5.54 +++ gnus-start.el 2000/05/29 12:00:19 @@ -1523,8 +1523,8 @@ (setq method (gnus-server-get-method nil method))))) (not (gnus-secondary-method-p method))) ;; These groups are foreign. Check the level. - (when (<= (gnus-info-level info) foreign-level) - (setq active (gnus-activate-group group 'scan)) + (when (and (<= (gnus-info-level info) foreign-level) + (setq active (gnus-activate-group group 'scan))) ;; Let the Gnus agent save the active file. (when (and gnus-agent gnus-plugged active) (gnus-agent-save-group-info @@ -1565,7 +1565,8 @@ (setq active (gnus-activate-group group)) (setq active (gnus-activate-group group 'scan)) (push method scanned-methods)) - (inline (gnus-close-group group)))))) + (when active + (gnus-close-group group)))))) ;; Get the number of unread articles in the group. (cond @@ -1587,7 +1588,7 @@ (let* ((mg (pop retrievegroups)) (method (or (car mg) gnus-select-method)) (groups (cdr mg))) - (gnus-check-server method) + (when (gnus-check-server method) ;; Request that the backend scan its incoming messages. (when (gnus-check-backend-function 'request-scan (car method)) (gnus-request-scan nil method)) @@ -1603,7 +1604,7 @@ ;; The group couldn't be reached, so we nix out the number of ;; unread articles and stuff. (gnus-set-active group nil) - (setcar (gnus-gethash group gnus-newsrc-hashtb) t)))))) + (setcar (gnus-gethash group gnus-newsrc-hashtb) t))))))) (gnus-message 5 "Checking new news...done")))