From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67513 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: bug in recent version of nnml.el Date: Fri, 03 Oct 2008 08:35:28 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222990645 19773 80.91.229.12 (2 Oct 2008 23:37:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Oct 2008 23:37:25 +0000 (UTC) Cc: ding@gnus.org, bugs@gnus.org To: Phillip Lord Original-X-From: ding-owner+M15964@lists.math.uh.edu Fri Oct 03 01:38:23 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1KlXkU-0007tP-Ur for ding-account@gmane.org; Fri, 03 Oct 2008 01:38:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1KlXiS-000765-0r; Thu, 02 Oct 2008 18:36:16 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1KlXiQ-00075s-D0 for ding@lists.math.uh.edu; Thu, 02 Oct 2008 18:36:14 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1KlXiN-0001AW-0d for ding@lists.math.uh.edu; Thu, 02 Oct 2008 18:36:14 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1KlXiR-0000Ni-00; Fri, 03 Oct 2008 01:36:15 +0200 Original-Received: from localhost ([127.0.0.1]:53775) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1KlXhl-0002Eo-JY; Thu, 02 Oct 2008 18:35:34 -0500 X-Hashcash: 1:20:081002:phillip.lord@newcastle.ac.uk::Gf4ASyO7ZwRrhard:00000000000000000000000000000000063Q0 X-Hashcash: 1:20:081002:ding@gnus.org::E13CI7lZUavQxBMH:00001r0q X-Hashcash: 1:20:081002:bugs@gnus.org::gr+wn4SIhiIxREhZ:00001Y/L X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:mc0VAJNBWcaycOzrCqatIv5TbsI= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67513 Archived-At: >>>>> 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 * 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 . * nnfolder.el (nnfolder-request-expire-articles): Ditto. Mail me if you've already signed or when you sign a paper to FSF. Regards,