Gnus development mailing list
 help / color / mirror / Atom feed
From: dsg@mitre.org (David S. Goldberg)
Subject: Bug in 0.79 mail-source with procmail
Date: 01 Mar 1999 10:22:17 -0500	[thread overview]
Message-ID: <m1bww11dyl2.fsf@blackbird.mitre.org> (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

             reply	other threads:[~1999-03-01 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-01 15:22 David S. Goldberg [this message]
1999-03-01 16:09 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1bww11dyl2.fsf@blackbird.mitre.org \
    --to=dsg@mitre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).