From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86605 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: hard rescan broken? Date: Thu, 14 Jan 2016 12:27:56 +0800 Message-ID: <87si20lr8z.fsf@ericabrahamsen.net> References: <12595.1452742046@allegro.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1452745749 22513 80.91.229.3 (14 Jan 2016 04:29:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jan 2016 04:29:09 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M34832@lists.math.uh.edu Thu Jan 14 05:28:57 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aJZWr-0007c9-1p for ding-account@gmane.org; Thu, 14 Jan 2016 05:28:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1aJZW9-0002XQ-Cb; Wed, 13 Jan 2016 22:28:13 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1aJZW6-0002X2-5K for ding@lists.math.uh.edu; Wed, 13 Jan 2016 22:28:10 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aJZW5-00061A-3g for ding@lists.math.uh.edu; Wed, 13 Jan 2016 22:28:10 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1aJZW3-0008RM-Cg for ding@gnus.org; Thu, 14 Jan 2016 05:28:07 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aJZW2-00076g-9m for ding@gnus.org; Thu, 14 Jan 2016 05:28:06 +0100 Original-Received: from 111.199.227.246 ([111.199.227.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jan 2016 05:28:06 +0100 Original-Received: from eric by 111.199.227.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jan 2016 05:28:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 79 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.199.227.246 User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:JZCAwkiGd+i/1r4xTnhBCFOZxTM= X-Spam-Score: -0.1 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86605 Archived-At: --=-=-= Content-Type: text/plain Mike Kupfer writes: > In the *Group* buffer, the docstring for "g" says > > If ARG is non-nil and not a number, this will force > "hard" re-reading of the active files from all servers. > > So IIUC, > > C-u g > > should give me a hard rescan. Instead I get an error with the following > backtrace: > > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p (4)) > <=(1 (4)) > gnus-get-unread-articles((4) nil nil) > gnus-group-get-new-news((4)) > funcall-interactively(gnus-group-get-new-news (4)) > call-interactively(gnus-group-get-new-news nil nil) > command-execute(gnus-group-get-new-news) > > I see this with Emacs 24.5 and Emacs 25. Am I confused or is this > broken? > > thanks, > mike My vote is for "broken". Would you try out the attached patch? It will avoid the error -- I also hope it will produce the correct behavior. Thanks, Eric --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Honor-docstring-of-gnus-group-get-new-news.patch >From 7ef58efd161bbcc11df99ec7a4856a3f3bf84896 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 14 Jan 2016 12:25:21 +0800 Subject: [PATCH] Honor docstring of gnus-group-get-new-news * lisp/gnus-start.el (gnus-get-unread-articles): If the prefix arg is t, but non-numeric, unconditionally consider all groups to need updating. --- lisp/gnus-start.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index f03ff85..f2e6978 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1672,10 +1672,11 @@ backend check whether the group actually exists." (push (setq method-group-list (list method method-type nil nil)) type-cache)) ;; Only add groups that need updating. - (if (funcall (if one-level #'= #'<=) (gnus-info-level info) - (if (eq (cadr method-group-list) 'foreign) - foreign-level - alevel)) + (if (or (and foreign-level (null (numberp foreign-level))) + (funcall (if one-level #'= #'<=) (gnus-info-level info) + (if (eq (cadr method-group-list) 'foreign) + foreign-level + alevel))) (setcar (nthcdr 2 method-group-list) (cons info (nth 2 method-group-list))) ;; The group is inactive, so we nix out the number of unread articles. -- 2.7.0 --=-=-=--