* Bug in 0.79 mail-source with procmail
@ 1999-03-01 15:22 David S. Goldberg
1999-03-01 16:09 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: David S. Goldberg @ 1999-03-01 15:22 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 2460 bytes --]
My setting:
(setq nnmail-spool-file `((directory :path
,(expand-file-name "~/.Mail/incoming"))
(file :path "/usr/spool/mail/dsg")))
I just upgraded from 0.77 to 0.79 and my nnml mail no longer gets
incorporated. It turns out to be the default predicate for
nnmail-spool-file. It's setting the string to be matched to
<groupname>$ instead of just <groupname>. Since I use the default
suffix (".spool"), the filenames always fail the string-match as a
result. Here's the relevant spot in a backtrace which I got by
setting debug-on-entry and did M-g over nnml:inbox (lines wrapped and
spaced by me for readability):
Return value: nil
string-match("inbox$" "/afs/rcf/user/dsg/.Mail/incoming/inbox.spool")
* (lambda (file) (string-match "inbox$" file))
("/afs/rcf/user/dsg/.Mail/incoming/inbox.spool")
* mail-source-fetch-directory((directory
:path "/afs/rcf/user/dsg/.Mail/incoming"
:predicate
(lambda (file) (string-match "inbox$" file)))
(lambda (file orig-file)
(nnmail-split-incoming
file (quote nnml-save-mail) (quote nil)
(nnmail-get-split-group orig-file source)
(quote nnml-active-number))))
* mail-source-fetch((directory
:path "/afs/rcf/user/dsg/.Mail/incoming"
:predicate
(lambda (file) (string-match "inbox$" file)))
(lambda (file orig-file)
(nnmail-split-incoming
file (quote nnml-save-mail) (quote nil)
(nnmail-get-split-group orig-file source)
(quote nnml-active-number))))
* nnmail-get-new-mail(nnml nnml-save-nov "/afs/rcf/user/dsg/.Mail" "inbox")
* nnml-request-scan("inbox" "")
* gnus-request-scan("nnml:inbox" (nnml ""))
* gnus-activate-group("nnml:inbox" scan)
* gnus-group-get-new-news-this-group(nil)
* byte-code("À ¬Á\n!ÃÄ !Á "
[gnus-group-topic-p gnus-group-get-new-news-this-group n
gnus-topic-mark-topic gnus-group-topic-name] 2)
* gnus-topic-get-new-news-this-topic(nil)
call-interactively(gnus-topic-get-new-news-this-topic)
I realize that since I use a separate directory for incoming files,
that the suffix is redundant. However, the suffix ".spool" is still
the default (without setting it myself, I saw it being used in the
backtrace as I stepped through it) and as such it shouldn't have
broken anything. It looks like the right fix would be to do a
mail-source-bind just before setting the predicate and incorporating
the suffix into it. Attached is a patch.
[-- Attachment #2: nnmail.el.079.diff --]
[-- Type: application/octet-stream, Size: 1294 bytes --]
diff -c /afs/rcf/user/dsg/elisp/gnus/pgnus/lisp/nnmail.el.079 /afs/rcf/user/dsg/elisp/gnus/pgnus/lisp/nnmail.el
*** /afs/rcf/user/dsg/elisp/gnus/pgnus/lisp/nnmail.el.079 Mon Mar 1 10:12:53 1999
--- /afs/rcf/user/dsg/elisp/gnus/pgnus/lisp/nnmail.el Mon Mar 1 10:12:53 1999
***************
*** 1376,1387 ****
;; Hack to only fetch the contents of a single group's spool file.
(when (and (eq (car source) 'directory)
group)
! (setq source (append source
! (list :predicate
! `(lambda (file)
! (string-match
! ,(concat (regexp-quote group) "$")
! file))))))
(when nnmail-fetched-sources
(if (member source nnmail-fetched-sources)
(setq source nil)
--- 1376,1389 ----
;; Hack to only fetch the contents of a single group's spool file.
(when (and (eq (car source) 'directory)
group)
! (mail-source-bind (directory source)
! (setq source (append source
! (list :predicate
! `(lambda (file)
! (string-match
! ,(concat (regexp-quote group)
! (regexp-quote suffix) "$")
! file)))))))
(when nnmail-fetched-sources
(if (member source nnmail-fetched-sources)
(setq source nil)
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
Thanks,
--
Dave Goldberg
Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730
Phone: 781-271-3887
Email: dsg@mitre.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug in 0.79 mail-source with procmail
1999-03-01 15:22 Bug in 0.79 mail-source with procmail David S. Goldberg
@ 1999-03-01 16:09 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-03-01 16:09 UTC (permalink / raw)
dsg@mitre.org (David S. Goldberg) writes:
> Return value: nil
> string-match("inbox$" "/afs/rcf/user/dsg/.Mail/incoming/inbox.spool")
Oh; right. The patch from Lantz Moore fixes this in 0.80.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-03-01 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-01 15:22 Bug in 0.79 mail-source with procmail David S. Goldberg
1999-03-01 16:09 ` Lars Magne Ingebrigtsen
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).