Gnus development mailing list
 help / color / mirror / Atom feed
* hard rescan broken?
@ 2016-01-14  3:27 Mike Kupfer
  2016-01-14  4:27 ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Kupfer @ 2016-01-14  3:27 UTC (permalink / raw)
  To: ding

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hard rescan broken?
  2016-01-14  3:27 hard rescan broken? Mike Kupfer
@ 2016-01-14  4:27 ` Eric Abrahamsen
  2016-01-14 17:39   ` Mike Kupfer
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2016-01-14  4:27 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

Mike Kupfer <m.kupfer@acm.org> 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Honor-docstring-of-gnus-group-get-new-news.patch --]
[-- Type: text/x-diff, Size: 1325 bytes --]

From 7ef58efd161bbcc11df99ec7a4856a3f3bf84896 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hard rescan broken?
  2016-01-14  4:27 ` Eric Abrahamsen
@ 2016-01-14 17:39   ` Mike Kupfer
  2016-01-15  1:20     ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Kupfer @ 2016-01-14 17:39 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen wrote:

> Would you try out the attached patch? It will
> avoid the error -- I also hope it will produce the correct behavior.

Yes--the error is gone, and I see Gnus going through a complete rescan.
(Or at least I assume it's a complete rescan; it's a lot slower than a
normal rescan, but in the end everything looks good.)

Thanks!

mike



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hard rescan broken?
  2016-01-14 17:39   ` Mike Kupfer
@ 2016-01-15  1:20     ` Eric Abrahamsen
  2016-01-15 16:25       ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2016-01-15  1:20 UTC (permalink / raw)
  To: Mike Kupfer; +Cc: ding

Mike Kupfer <m.kupfer@acm.org> writes:

> Eric Abrahamsen wrote:
>
>> Would you try out the attached patch? It will
>> avoid the error -- I also hope it will produce the correct behavior.
>
> Yes--the error is gone, and I see Gnus going through a complete rescan.
> (Or at least I assume it's a complete rescan; it's a lot slower than a
> normal rescan, but in the end everything looks good.)
>
> Thanks!

Okay, cool -- I'll push the patch a little later today.

E



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hard rescan broken?
  2016-01-15  1:20     ` Eric Abrahamsen
@ 2016-01-15 16:25       ` Eric Abrahamsen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2016-01-15 16:25 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Mike Kupfer <m.kupfer@acm.org> writes:
>
>> Eric Abrahamsen wrote:
>>
>>> Would you try out the attached patch? It will
>>> avoid the error -- I also hope it will produce the correct behavior.
>>
>> Yes--the error is gone, and I see Gnus going through a complete rescan.
>> (Or at least I assume it's a complete rescan; it's a lot slower than a
>> normal rescan, but in the end everything looks good.)
>>
>> Thanks!
>
> Okay, cool -- I'll push the patch a little later today.

Apologies to Katsumi Yamaoka! Someday I will remember to include the
Changelog in my patches...




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-15 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-14  3:27 hard rescan broken? Mike Kupfer
2016-01-14  4:27 ` Eric Abrahamsen
2016-01-14 17:39   ` Mike Kupfer
2016-01-15  1:20     ` Eric Abrahamsen
2016-01-15 16:25       ` Eric Abrahamsen

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).