Gnus development mailing list
 help / color / mirror / Atom feed
* broken cache causes wrong-type-argument error when selecting an nnimap group
@ 2016-09-05 15:40 TSUCHIYA Masatoshi
  2016-10-05 16:38 ` Thorsten Jolitz
  0 siblings, 1 reply; 6+ messages in thread
From: TSUCHIYA Masatoshi @ 2016-09-05 15:40 UTC (permalink / raw)
  To: ding

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

Hi,

I saw the following error message when selecting an nnimap group.

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  gnus-sorted-difference((1928 1929 1930 ...))
  gnus-select-newsgroup("admin.moderator" t nil)
  gnus-summary-read-group-1("admin.moderator" t nil nil nil nil)
  gnus-summary-read-group("admin.moderator" t nil nil nil nil nil)
  gnus-group-read-group(nil)
  call-interactively(gnus-group-read-group nil nil)
  command-execute(gnus-group-read-group)

I think this problem is caused by broken cached headers, because the
attached ad-hoc patch to remove broken cached headers resolves this
problem.  Therefore, if I can remove broken cached headers, the attached
patch is unnecessary.

The problem is that I cannot find the location where the cache is saved.
I have already searched ~/.emacs.d/, ~/.newsrc.eld and the directory
specified by `gnus-cache-directory'.  However, I cannot find it.

Could you give an advise to me?

-- 
TSUCHIYA Masatoshi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 1101 bytes --]

--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -4147,6 +4147,11 @@ If SELECT-ARTICLES, only select those articles from GROUP."
     (gnus-run-hooks 'gnus-summary-generate-hook)
     ;; Generate the buffer, either with threads or without.
     (when gnus-newsgroup-headers
+      (setq gnus-newsgroup-headers
+	    (delq nil
+		  (mapcar (lambda (h)
+			    (and (integerp (mail-header-number h)) h))
+			  gnus-newsgroup-headers)))
       (gnus-summary-prepare-threads
        (if gnus-show-threads
 	   (gnus-sort-gathered-threads
@@ -5726,8 +5731,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
       (setq gnus-newsgroup-limit (copy-sequence articles))
       ;; Remove canceled articles from the list of unread articles.
       (setq fetched-articles
-	    (mapcar (lambda (headers) (mail-header-number headers))
-		    gnus-newsgroup-headers))
+	    (delq nil (mapcar (lambda (headers) (mail-header-number headers))
+			      gnus-newsgroup-headers)))
       (setq gnus-newsgroup-articles fetched-articles)
       (setq gnus-newsgroup-unreads
 	    (gnus-sorted-nintersection

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

* Re: broken cache causes wrong-type-argument error when selecting an nnimap group
  2016-09-05 15:40 broken cache causes wrong-type-argument error when selecting an nnimap group TSUCHIYA Masatoshi
@ 2016-10-05 16:38 ` Thorsten Jolitz
  2016-10-06 18:59   ` Stig Brautaset
  0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2016-10-05 16:38 UTC (permalink / raw)
  To: ding

TSUCHIYA Masatoshi <tsuchiya@namazu.org> writes:

Hi,

> I saw the following error message when selecting an nnimap group.
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   gnus-sorted-difference((1928 1929 1930 ...))
>   gnus-select-newsgroup("admin.moderator" t nil)
>   gnus-summary-read-group-1("admin.moderator" t nil nil nil nil)
>   gnus-summary-read-group("admin.moderator" t nil nil nil nil nil)
>   gnus-group-read-group(nil)
>   call-interactively(gnus-group-read-group nil nil)
>   command-execute(gnus-group-read-group)
>
> I think this problem is caused by broken cached headers, because the
> attached ad-hoc patch to remove broken cached headers resolves this
> problem.  Therefore, if I can remove broken cached headers, the attached
> patch is unnecessary.
>
> The problem is that I cannot find the location where the cache is saved.
> I have already searched ~/.emacs.d/, ~/.newsrc.eld and the directory
> specified by `gnus-cache-directory'.  However, I cannot find it.
>
> Could you give an advise to me?

I see a similar error when I try to mark all groups as read:

,----
| Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
|   gnus-sequence-of-unread-articles("nnimap+xyz:INBOX")
|   gnus-group-catchup("nnimap+xyz:INBOX" nil)
|   gnus-group-catchup-current(nil)
|   funcall-interactively(gnus-group-catchup-current nil)
|   call-interactively(gnus-group-catchup-current)
|   gnus-topic-catchup-articles(nil)
|   funcall-interactively(gnus-topic-catchup-articles nil)
|   call-interactively(gnus-topic-catchup-articles nil nil)
|   command-execute(gnus-topic-catchup-articles)
`----

and access to my nnimap (google) accounts does not work anymore (access
denied) since yesterday, although I already updated Emacs some days
before and it worked. The only thing that changed is underlying
Archlinux, since I updated it on a daily basis.

Wrt to the cache:

,----[ C-h v gnus-cache-directory RET ]
| gnus-cache-directory is a variable defined in ‘gnus.el’.
| Its value is "~/News/cache/"
| 
| Documentation:
| *The directory where cached articles will be stored.
`----

I can find it in my home directory, but there is not much in it, and
nothing related to the gmail problems.

Any hints are welcome.

-- 
cheers,
Thorsten




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

* Re: broken cache causes wrong-type-argument error when selecting an nnimap group
  2016-10-05 16:38 ` Thorsten Jolitz
@ 2016-10-06 18:59   ` Stig Brautaset
  2016-10-07  5:28     ` Adam Sjøgren
  0 siblings, 1 reply; 6+ messages in thread
From: Stig Brautaset @ 2016-10-06 18:59 UTC (permalink / raw)
  To: ding

Thorsten Jolitz <tjolitz@gmail.com> writes:

[...]

> ,----[ C-h v gnus-cache-directory RET ]
> | gnus-cache-directory is a variable defined in ‘gnus.el’.
> | Its value is "~/News/cache/"
> | 
> | Documentation:
> | *The directory where cached articles will be stored.
> `----

Completely unrelated to the rest of the thread, sorry, but I've seen the
above box quote in a few threads now, and wondering if there's a
built-in function for it?


Stig
-- 
: Stig Brautaset, GNU Emacs 25.1.1, Org-mode version 8.3.6




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

* Re: broken cache causes wrong-type-argument error when selecting an nnimap group
  2016-10-06 18:59   ` Stig Brautaset
@ 2016-10-07  5:28     ` Adam Sjøgren
  2016-10-10 16:31       ` Thorsten Jolitz
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Sjøgren @ 2016-10-07  5:28 UTC (permalink / raw)
  To: ding

Stig writes:

> Completely unrelated to the rest of the thread, sorry, but I've seen the
> above box quote in a few threads now, and wondering if there's a
> built-in function for it?

boxquote.el - it can be found in the package emacs-goodies-el on
Debian-based systems.


  Best regards,

    Adam

-- 
 "Chairman of the pedantic association." "It is               Adam Sjøgren
  actually the society of pedantics, but I'll let that   asjo@koldfront.dk
  go."




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

* Re: broken cache causes wrong-type-argument error when selecting an nnimap group
  2016-10-07  5:28     ` Adam Sjøgren
@ 2016-10-10 16:31       ` Thorsten Jolitz
  2016-10-11 13:56         ` Adam Sjøgren
  0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2016-10-10 16:31 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Stig writes:
>
>> Completely unrelated to the rest of the thread, sorry, but I've seen the
>> above box quote in a few threads now, and wondering if there's a
>> built-in function for it?
>
> boxquote.el - it can be found in the package emacs-goodies-el on
> Debian-based systems.

Not sure if emacs-goodies-el is up-to-date or rather carries some
obsolete stuff too?

You might as well do M-x

,----[ C-h f list-packages RET ]
| list-packages is an interactive autoloaded compiled Lisp function in
| ‘package.el’.
| 
| (list-packages &optional NO-FETCH)
| 
| Display a list of packages.
| This first fetches the updated list of packages before
| displaying, unless a prefix argument NO-FETCH is specified.
| The list is displayed in a buffer named ‘*Packages*’.
`----

and install boxquote.el from there.

-- 
cheers,
Thorsten




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

* Re: broken cache causes wrong-type-argument error when selecting an nnimap group
  2016-10-10 16:31       ` Thorsten Jolitz
@ 2016-10-11 13:56         ` Adam Sjøgren
  0 siblings, 0 replies; 6+ messages in thread
From: Adam Sjøgren @ 2016-10-11 13:56 UTC (permalink / raw)
  To: ding

Thorsten writes:

> asjo@koldfront.dk (Adam Sjøgren) writes:

>> boxquote.el - it can be found in the package emacs-goodies-el on
>> Debian-based systems.

> Not sure if emacs-goodies-el is up-to-date or rather carries some
> obsolete stuff too?

Me neither, but I prefer my OS' package system over every application
rolling its own.


  Best regards,

    Adam

-- 
 "the office is quiet now, i am at the desk, preparing        Adam Sjøgren
  to landscape for another day."                         asjo@koldfront.dk




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

end of thread, other threads:[~2016-10-11 13:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 15:40 broken cache causes wrong-type-argument error when selecting an nnimap group TSUCHIYA Masatoshi
2016-10-05 16:38 ` Thorsten Jolitz
2016-10-06 18:59   ` Stig Brautaset
2016-10-07  5:28     ` Adam Sjøgren
2016-10-10 16:31       ` Thorsten Jolitz
2016-10-11 13:56         ` Adam Sjøgren

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