Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Phillip Lord <phillip.lord@newcastle.ac.uk>
Cc: ding@gnus.org, bugs@gnus.org
Subject: Re: bug in recent version of nnml.el
Date: Fri, 03 Oct 2008 08:35:28 +0900	[thread overview]
Message-ID: <b4m8wt6vadb.fsf@jpl.org> (raw)
In-Reply-To: <EMEW-k91AyF906d078456474eb10da550f3b4fb26ec-87od23724d.fsf@dinley.ncl.ac.uk>

>>>>> Phillip Lord wrote:

> On Gnu Emacs 23.0.60.1 there is a bug in nnml. I get this error on
> attempting to catchup in a group.

> Debugger entered--Lisp error: (wrong-type-argument stringp delete)
>   string-match("^\\([^:+]+\\)\\(?:\\+\\([^:]*\\)\\)?:" delete)
>   gnus-request-group(delete)
>   (or (gnus-request-group target) (gnus-request-create-group target))
>   (and target (or (gnus-request-group target) (gnus-request-create-group target)))
>   (if (and target (or ... ...)) (nnmail-expiry-target-group target group) (setq target nil))
>   (let (nnml-current-directory nnml-current-group nnml-article-file-alist) (when (functionp target) (setq target ...)) (if (and target ...) (nnmail-expiry-target-group target group) (setq target nil)))
>   (save-current-buffer (set-buffer temp-buffer) (nnml-request-article number group server (current-buffer)) (let (nnml-current-directory nnml-current-group nnml-article-file-alist) (when ... ...) (if ... ... ...)))
>   (with-current-buffer temp-buffer (nnml-request-article number group server (current-buffer)) (let (nnml-current-directory nnml-current-group nnml-article-file-alist) (when ... ...) (if ... ... ...)))
>   (unwind-protect (with-current-buffer temp-buffer (nnml-request-article number group server ...) (let ... ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
>   (let ((temp-buffer ...)) (unwind-protect (with-current-buffer temp-buffer ... ...) (and ... ...)))
>   (with-temp-buffer (nnml-request-article number group server (current-buffer)) (let (nnml-current-directory nnml-current-group nnml-article-file-alist) (when ... ...) (if ... ... ...)))
>   (if (eq target (quote delete)) nil (with-temp-buffer (nnml-request-article number group server ...) (let ... ... ...)) (nnml-possibly-change-directory group server))
>   (unless (eq target (quote delete)) (with-temp-buffer (nnml-request-article number group server ...) (let ... ... ...)) (nnml-possibly-change-directory group server))
>   (progn (setq target nnmail-expiry-target) (unless (eq target ...) (with-temp-buffer ... ...) (nnml-possibly-change-directory group server)) (if target (progn ... ... ... ...) (push number rest)))
>   (if (and (setq article ...) (setq mod-time ...) (nnml-deletable-article-p group number) (setq is-old ...)) (progn (setq target nnmail-expiry-target) (unless ... ... ...) (if target ... ...)) (push number rest))
>   (while (and articles is-old) (if (and ... ... ... ...) (progn ... ... ...) (push number rest)))
>   (let* ((file-name-coding-system nnmail-pathname-coding-system) (active-articles ...) (is-old t) (decoded ...) article rest mod-time number target) (nnmail-activate (quote nnml)) (setq active-articles (sort active-articles ...)) (setq articles (gnus-sorted-intersection articles active-articles)) (while (and articles is-old) (if ... ... ...)) (let (...) (when active ...) (nnmail-save-active nnml-group-alist nnml-active-file)) (nnml-save-nov) (nconc rest articles))
>   nnml-request-expire-articles((9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 ...) "stormcock" "" nil)
>   gnus-request-expire-articles((9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 ...) "nnml:stormcock")
>   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()
>   gnus-summary-catchup-and-exit(nil)
>   call-interactively(gnus-summary-catchup-and-exit nil nil)

> The problem comes from this bit of code here...

> 	    ;; Allow a special target group.
> 	    (setq target nnmail-expiry-target)
> 	    (unless (eq target 'delete)
> 	      (with-temp-buffer
> 		(nnml-request-article number group server (current-buffer))
> 		(let (nnml-current-directory
> 		      nnml-current-group
> 		      nnml-article-file-alist)
> 		  (when (functionp target)
> 		    (setq target (funcall target group)))
> 		  (if (and target
> 			   (or (gnus-request-group target)
> 			       (gnus-request-create-group target)))
> 		      (nnmail-expiry-target-group target group)
> 		    (setq target nil))))
> 	      ;; Maybe directory is changed during nnmail-expiry-target-group.
> 	      (nnml-possibly-change-directory group server))

> This statement assumes that target or the result of calling target is a group...

>   (if (and target
>      (or (gnus-request-group target)
> 	 (gnus-request-create-group target)))

> But it could be delete also as recognised just above.

> Moving the funcall to before the unless fixes the problem, as shown here.

> 	    ;; Allow a special target group.
> 	    (setq target nnmail-expiry-target)
>             (when (functionp target)
> 		    (setq target (funcall target group)))

> 	    (unless (eq target 'delete)
> 	      (with-temp-buffer
> 		(nnml-request-article number group server (current-buffer))
> 		(let (nnml-current-directory
> 		      nnml-current-group
> 		      nnml-article-file-alist)
> 		  (if (and target
> 			   (or (gnus-request-group target)
> 			       (gnus-request-create-group target)))
> 		      (nnmail-expiry-target-group target group)
> 		    (setq target nil))))
> 	      ;; Maybe directory is changed during nnmail-expiry-target-group.
> 	      (nnml-possibly-change-directory group server))

> Thanks for Gnus!

> Phil

Thank you for inquiring into the bug so closely.  I could reproduce
it using:

(setq nnmail-expiry-target (lambda (&rest args) 'delete))

Furthermore, I checked nnbabyl.el, nndiary.el, nnfolder.el,
nnimap.el, nnmbox.el and nnmh.el, and found the same problem in
nnfolder.el, too.  The others seem to be safe.  I've installed
the fix that is slightly modified from yours in the Gnus CVS
trunk (it will be merged to the Emacs trunk soon).

The changelog entry is as follows now but I'd like to replace
the entry line with your name.

2008-10-02  Katsumi Yamaoka  <yamaoka@jpl.org>

	* nnml.el (nnml-request-expire-articles): Expand nnmail-expiry-target
	to an actual expiry target first if it is a function.  Suggested by
	Phillip Lord <phillip.lord@newcastle.ac.uk>.

	* nnfolder.el (nnfolder-request-expire-articles): Ditto.

Mail me if you've already signed or when you sign a paper to FSF.

Regards,



       reply	other threads:[~2008-10-02 23:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <EMEW-k91AyF906d078456474eb10da550f3b4fb26ec-87od23724d.fsf@dinley.ncl.ac.uk>
2008-10-02 23:35 ` Katsumi Yamaoka [this message]
2008-10-02 23:50   ` Katsumi Yamaoka
2008-10-03  1:52     ` Katsumi Yamaoka
     [not found] ` <EMEW-k920Zffc12dea83ee2ef6b314c1d218e22b9e9-b4m8wt6vadb.fsf@jpl.org>
2008-10-03  9:52   ` Phillip Lord
2008-10-03 10:21     ` Katsumi Yamaoka
2008-10-03 14:48       ` Reiner Steib
     [not found]       ` <EMEW-k92Fmm5706e6efbf06ac13a4733671cc4e7a7c-87y715enuf.fsf@marauder.physik.uni-ulm.de>
2008-10-03 15:54         ` Phillip Lord
     [not found]     ` <EMEW-k92BM1c131f9b8dc92f8fae9342efde519d3d5-b4mwsgqhtc0.fsf@jpl.org>
2008-10-03 15:53       ` Phillip Lord

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=b4m8wt6vadb.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=bugs@gnus.org \
    --cc=ding@gnus.org \
    --cc=phillip.lord@newcastle.ac.uk \
    /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).