From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75455 Path: news.gmane.org!not-for-mail From: Wang Diancheng Newsgroups: gmane.emacs.gnus.general Subject: [Wang Diancheng] patch for Gnus, fix goto article failed when nnml-use-compressed-files is t Date: Mon, 27 Dec 2010 22:02:56 +0800 Message-ID: <87tyhzjotr.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1293465229 14774 80.91.229.12 (27 Dec 2010 15:53:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Dec 2010 15:53:49 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23806@lists.math.uh.edu Mon Dec 27 16:53:45 2010 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.69) (envelope-from ) id 1PXFOI-0004xr-GW for ding-account@gmane.org; Mon, 27 Dec 2010 16:53:42 +0100 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 1PXFOD-0007lO-ER; Mon, 27 Dec 2010 09:53:37 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PXDfL-0007Go-TE for ding@lists.math.uh.edu; Mon, 27 Dec 2010 08:03:11 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PXDfI-0006Qb-AI for ding@lists.math.uh.edu; Mon, 27 Dec 2010 08:03:09 -0600 Original-Received: from smtpcom.263xmail.com ([211.150.64.24]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PXDfE-0008Mv-Sa for ding@gnus.org; Mon, 27 Dec 2010 15:03:05 +0100 Original-Received: from smtpcom.263xmail.com (localhost.localdomain [127.0.0.1]) by smtpcom.263xmail.com (Postfix) with ESMTP id 4E195BF5BA for ; Mon, 27 Dec 2010 22:02:39 +0800 (CST) X-ABS-CHECKED: 1 X-KSVirus-check: 0 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtpcom.263xmail.com (Postfix) with ESMTP id 1D764938 for ; Mon, 27 Dec 2010 22:02:39 +0800 (CST) X-SENDER-IP: 123.116.56.212 X-LOGIN-NAME: dcwang@kingbase.com.cn X-ATTACHMENT-NUM: 1 X-SENDER: dcwang@kingbase.com.cn Original-Received: from localhost (unknown [123.116.56.212]) by smtpcom.263xmail.com (Postfix) whith ESMTP id 19267BTE987; Mon, 27 Dec 2010 22:02:39 +0800 (CST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -0.2 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:75455 Archived-At: --=-=-= Content-Type: text/plain Hi, Could someone review and process my patch, this is my first patch for Gnus. thank you very much. I am really appreciated your response. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline From: Wang Diancheng To: emacs-devel@gnu.org Subject: patch for Gnus, fix goto article failed when nnml-use-compressed-files is t Date: Tue, 21 Dec 2010 17:46:46 +0800 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Draft-From: ("gmane.emacs.gnus.general") Xref: swida mail.misc:16506 Message-ID: <87bp4dmbfl.fsf@kingbase.com.cn> Lines: 59 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===-=-=" --===-=-= Content-Type: multipart/mixed; boundary="====-=-=" --====-=-= Content-Type: text/plain Hi, Gnus backend is nnml with "(setq nnml-use-compressed-files t)" when calling function: (gnus-summary-goto-article "<201012201809341712361@163.com>") here, "<201012201809341712361@163.com>" is a message-id of a exist article, which is compressed by nnml. will print error message: Couldn't fetch article <201012201809341712361@163.com> the attached patch for fix it. --====-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=fix-goto-article.patch --- nnml.el~ 2010-12-21 17:33:07.000000000 +0800 +++ nnml.el 2010-12-21 17:33:09.000000000 +0800 @@ -235,7 +235,11 @@ (nnheader-article-to-file-alist (setq gpath (nnml-group-pathname (car group-num) nil server)))))) - (setq path (concat gpath (int-to-string (cdr group-num))))) + (nnml-update-file-alist) + (setq path (concat gpath (if nnml-use-compressed-files + (cdr (assq (cdr group-num) + nnml-article-file-alist)) + (number-to-string (cdr group-num)))))) (setq path (nnml-article-to-file id))) (cond ((not path) --====-=-=-- --===-=-= Content-Type: text/plain -- Best Regards, Wang Diancheng --===-=-=-- --=-=-=--