* wrong-type-argument exiting nnml group
@ 2001-09-15 17:14 Samuel Padgett
2001-09-15 17:58 ` Simon Josefsson
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Padgett @ 2001-09-15 17:14 UTC (permalink / raw)
I'm running Oort Gnus 0.04, updated from CVS yesterday. When I quit
one of my nnml groups with `q', I get this error:
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p Sun\,)
<(Sun\, <200108122203\.f7CM3mq00651@telengard\.sturk\.net>)
sort((33) <)
nnml-request-expire-articles((29 31) "mail.misc" "" nil)
gnus-request-expire-articles((29 31) "nnml:mail.misc")
gnus-summary-expire-articles()
run-hooks(gnus-summary-prepare-exit-hook)
apply(run-hooks gnus-summary-prepare-exit-hook)
gnus-run-hooks(gnus-summary-prepare-exit-hook)
gnus-summary-exit()
call-interactively(gnus-summary-exit)
Any thoughts?
Sam
--
May all your PUSHes be POPped.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wrong-type-argument exiting nnml group
2001-09-15 17:14 wrong-type-argument exiting nnml group Samuel Padgett
@ 2001-09-15 17:58 ` Simon Josefsson
2001-09-15 18:58 ` Samuel Padgett
0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2001-09-15 17:58 UTC (permalink / raw)
Cc: ding
Samuel Padgett <spadgett1@nc.rr.com> writes:
> I'm running Oort Gnus 0.04, updated from CVS yesterday. When I quit
> one of my nnml groups with `q', I get this error:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p Sun\,)
> <(Sun\, <200108122203\.f7CM3mq00651@telengard\.sturk\.net>)
> sort((33) <)
> nnml-request-expire-articles((29 31) "mail.misc" "" nil)
Maybe the NOV file is corrupt. Try M-x nnml-generate-nov-databases RET.
(Or manually inspect the .overview file to possibly find why it became
corrupt.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wrong-type-argument exiting nnml group
2001-09-15 17:58 ` Simon Josefsson
@ 2001-09-15 18:58 ` Samuel Padgett
2001-09-15 19:48 ` Simon Josefsson
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Padgett @ 2001-09-15 18:58 UTC (permalink / raw)
Simon Josefsson <jas@extundo.com> writes:
> Try M-x nnml-generate-nov-databases RET.
Thanks. That fixed it.
> (Or manually inspect the .overview file to possibly find why it became
> corrupt.)
Gah. Information for article 1 was split up over multiple lines
instead of all on one NOV line. Any idea how that might have
happened?
Hm. Looking at it after nnml-generate-nov-databases, I see that there
is a ^M after each header field for article 1. Could this have caused
the problem? I'm running Debian unstable. Maybe this is an issue
with my MTA?
Sam
--
May all your PUSHes be POPped.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wrong-type-argument exiting nnml group
2001-09-15 18:58 ` Samuel Padgett
@ 2001-09-15 19:48 ` Simon Josefsson
2001-09-15 20:56 ` Samuel Padgett
0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2001-09-15 19:48 UTC (permalink / raw)
Cc: ding
Samuel Padgett <spadgett1@nc.rr.com> writes:
>> (Or manually inspect the .overview file to possibly find why it became
>> corrupt.)
>
> Gah. Information for article 1 was split up over multiple lines
> instead of all on one NOV line. Any idea how that might have
> happened?
>
> Hm. Looking at it after nnml-generate-nov-databases, I see that there
> is a ^M after each header field for article 1. Could this have caused
> the problem?
Yes. I do not understand how that happens though, even if the article
in question uses CRLF the NOV parsing routine isn't fooled, at least
for me.
If you edebug `nnml-generate-nov-file', does the *nntpd* buffer
contain ^M's after the call to `nnheader-insert-file-contents'? It
doesn't for me, and I suspect it is a feature but I'm not sure why it
happens.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wrong-type-argument exiting nnml group
2001-09-15 19:48 ` Simon Josefsson
@ 2001-09-15 20:56 ` Samuel Padgett
2001-09-15 21:20 ` Simon Josefsson
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Padgett @ 2001-09-15 20:56 UTC (permalink / raw)
Simon Josefsson <jas@extundo.com> writes:
> Samuel Padgett <spadgett1@nc.rr.com> writes:
>
>> Hm. Looking at it after nnml-generate-nov-databases, I see that there
>> is a ^M after each header field for article 1. Could this have caused
>> the problem?
>
> Yes. I do not understand how that happens though, even if the article
> in question uses CRLF the NOV parsing routine isn't fooled, at least
> for me.
I looked at the article more closely and noticed it has mixed line
endings. The first four lines end with just a LF, whereas the rest
end with CRLF.
> If you edebug `nnml-generate-nov-file', does the *nntpd* buffer
> contain ^M's after the call to `nnheader-insert-file-contents'? It
> doesn't for me, and I suspect it is a feature but I'm not sure why it
> happens.
Yes, the *nntpd* buffer contains the ^M's. I'm sure it's because of
the mixed line endings, though.
Sam
--
May all your PUSHes be POPped.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wrong-type-argument exiting nnml group
2001-09-15 20:56 ` Samuel Padgett
@ 2001-09-15 21:20 ` Simon Josefsson
2001-09-15 22:03 ` Samuel Padgett
0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2001-09-15 21:20 UTC (permalink / raw)
Cc: ding
Samuel Padgett <spadgett1@nc.rr.com> writes:
> Simon Josefsson <jas@extundo.com> writes:
>
>> Samuel Padgett <spadgett1@nc.rr.com> writes:
>>
>>> Hm. Looking at it after nnml-generate-nov-databases, I see that there
>>> is a ^M after each header field for article 1. Could this have caused
>>> the problem?
>>
>> Yes. I do not understand how that happens though, even if the article
>> in question uses CRLF the NOV parsing routine isn't fooled, at least
>> for me.
>
> I looked at the article more closely and noticed it has mixed line
> endings. The first four lines end with just a LF, whereas the rest
> end with CRLF.
Ouch. Nnml articles should have LF line endings. Can you find out
how this happened?
Anyway, I committed the following to make nnml a little bit more
robust about these kind of errors. You should be able to M-x
nnml-generate-nov-databases RET and having things work now.
2001-09-15 Simon Josefsson <jas@extundo.com>
* nnml.el (nnml-parse-head): Handle CRLF files.
(nnml-generate-nov-file): Ditto.
(nnml-retrieve-headers): Ditto.
Index: nnml.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnml.el,v
retrieving revision 6.25
diff -u -u -w -u -w -r6.25 nnml.el
--- nnml.el 2001/09/08 20:55:16 6.25
+++ nnml.el 2001/09/15 21:17:19
@@ -157,7 +157,7 @@
(setq beg (point))
(nnheader-insert-head file)
(goto-char beg)
- (if (search-forward "\n\n" nil t)
+ (if (re-search-forward "\n\r?\n" nil t)
(forward-char -1)
(goto-char (point-max))
(insert "\n\n"))
@@ -713,13 +713,15 @@
(unless (zerop (buffer-size))
(narrow-to-region
(goto-char (point-min))
- (if (search-forward "\n\n" nil t) (1- (point)) (point-max))))
+ (if (re-search-forward "\n\r?\n" nil t) (1- (point)) (point-max))))
;; Fold continuation lines.
(goto-char (point-min))
(while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
(replace-match " " t t))
;; Remove any tabs; they are too confusing.
(subst-char-in-region (point-min) (point-max) ?\t ? )
+ ;; Remove any ^M's; they are too confusing.
+ (subst-char-in-region (point-min) (point-max) ?\r ? )
(let ((headers (nnheader-parse-head t)))
(mail-header-set-chars headers chars)
(mail-header-set-number headers number)
@@ -838,7 +840,7 @@
(narrow-to-region
(goto-char (point-min))
(progn
- (search-forward "\n\n" nil t)
+ (re-search-forward "\n\r?\n" nil t)
(setq chars (- (point-max) (point)))
(max 1 (1- (point)))))
(unless (zerop (buffer-size))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: wrong-type-argument exiting nnml group
2001-09-15 21:20 ` Simon Josefsson
@ 2001-09-15 22:03 ` Samuel Padgett
0 siblings, 0 replies; 7+ messages in thread
From: Samuel Padgett @ 2001-09-15 22:03 UTC (permalink / raw)
Simon Josefsson <jas@extundo.com> writes:
> Ouch. Nnml articles should have LF line endings. Can you find out
> how this happened?
Sure, I'll look into it. I'm confident it doesn't have anything to do
with Gnus, though. For a while, some months back, I strayed from the
path. I was using procmail to filter mail into maildir folders that I
read with Mutt. I noticed some ^M's in mail headers way back then.
Again, I'm running Debian unstable, so it wouldn't surprise me if an
unstable version of procmail or Mutt is to blame.
> Anyway, I committed the following to make nnml a little bit more
> robust about these kind of errors. You should be able to M-x
> nnml-generate-nov-databases RET and having things work now.
>
> 2001-09-15 Simon Josefsson <jas@extundo.com>
>
> * nnml.el (nnml-parse-head): Handle CRLF files.
> (nnml-generate-nov-file): Ditto.
> (nnml-retrieve-headers): Ditto.
[...]
Ah, cool. I see no more ^M's in .overview. Thanks!
Sam
--
May all your PUSHes be POPped.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-09-15 22:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-15 17:14 wrong-type-argument exiting nnml group Samuel Padgett
2001-09-15 17:58 ` Simon Josefsson
2001-09-15 18:58 ` Samuel Padgett
2001-09-15 19:48 ` Simon Josefsson
2001-09-15 20:56 ` Samuel Padgett
2001-09-15 21:20 ` Simon Josefsson
2001-09-15 22:03 ` Samuel Padgett
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).