From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25713 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: strange behaviour when `B c'ing an empty article Date: 06 Oct 1999 23:20:37 -0400 Organization: U of Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <5bvh8jonzu.fsf@giga.cs.rochester.edu> References: <874sg46wco.fsf@chow.mat.jhu.edu> <5b7ll03wfa.fsf@giga.cs.rochester.edu> <87g0zoc8yk.fsf@chow.mat.jhu.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035163049 15467 80.91.224.250 (21 Oct 2002 01:17:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:17:29 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id XAA28896 for ; Wed, 6 Oct 1999 23:22:51 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id WAB28674; Wed, 6 Oct 1999 22:21:44 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 06 Oct 1999 22:22:49 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id WAA27654 for ; Wed, 6 Oct 1999 22:22:38 -0500 (CDT) Original-Received: from cayuga.cs.rochester.edu (cayuga.cs.rochester.edu [192.5.53.209]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id XAA28863 for ; Wed, 6 Oct 1999 23:20:40 -0400 (EDT) Original-Received: from giga.cs.rochester.edu (giga.cs.rochester.edu [192.5.53.186]) by cayuga.cs.rochester.edu (8.9.3/Q) with ESMTP id XAA08485 for ; Wed, 6 Oct 1999 23:20:38 -0400 (EDT) Original-Received: (from zsh@localhost) by giga.cs.rochester.edu (8.9.1b+Sun/Q++) id XAA29442; Wed, 6 Oct 1999 23:20:37 -0400 (EDT) Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q In-Reply-To: Dan Christensen's message of "Wed, 06 Oct 1999 20:26:11 -0400" Original-Lines: 25 User-Agent: Gnus/5.07009701 (Pterodactyl Gnus v0.97.1) Emacs/20.4 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:25713 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:25713 --=-=-= >>>>> "Dan" == Dan Christensen writes: Dan> I don't see any change in the behaviour. The change is that 'B m' works. Now, another patch make more things work. (Committed) (Now, it's time to remove my a bunch of test nnfolder.) -- Shenghuo ZHU 1999-10-06 Shenghuo ZHU * nnfolder.el (nnfolder-request-move-article): For empty article, search till (point-max). (nnfolder-retrieve-headers): Ditto. (nnfolder-request-accept-article): Ditto. (nnfolder-save-mail): Ditto. (nnfolder-insert-newsgroup-line): Ditto. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=97-107.diff Index: nnfolder.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnfolder.el,v retrieving revision 5.19 diff -u -r5.19 nnfolder.el --- nnfolder.el 1999/10/06 23:23:20 5.19 +++ nnfolder.el 1999/10/07 03:14:29 @@ -119,8 +119,9 @@ (set-buffer nnfolder-current-buffer) (when (nnfolder-goto-article article) (setq start (point)) - (search-forward "\n\n" nil t) - (setq stop (1- (point))) + (setq stop (if (search-forward "\n\n" nil t) + (1- (point)) + (point-max))) (set-buffer nntp-server-buffer) (insert (format "221 %d Article retrieved.\n" article)) (insert-buffer-substring nnfolder-current-buffer start stop) @@ -401,8 +402,9 @@ (save-excursion (set-buffer buf) (goto-char (point-min)) - (search-forward "\n\n" nil t) - (forward-line -1) + (if (search-forward "\n\n" nil t) + (forward-line -1) + (goto-char (point-max))) (while (re-search-backward (concat "^" nnfolder-article-marker) nil t) (delete-region (point) (progn (forward-line 1) (point)))) (when nnmail-cache-accepted-message-ids @@ -648,8 +650,9 @@ (while (setq group-art (pop group-art-list)) ;; Kill any previous newsgroup markers. (goto-char (point-min)) - (search-forward "\n\n" nil t) - (forward-line -1) + (if (search-forward "\n\n" nil t) + (forward-line -1) + (goto-char (point-max))) (while (search-backward (concat "\n" nnfolder-article-marker) nil t) (delete-region (1+ (point)) (progn (forward-line 2) (point)))) @@ -678,10 +681,11 @@ (defun nnfolder-insert-newsgroup-line (group-art) (save-excursion (goto-char (point-min)) - (when (search-forward "\n\n" nil t) - (forward-char -1) - (insert (format (concat nnfolder-article-marker "%d %s\n") - (cdr group-art) (current-time-string)))))) + (if (search-forward "\n\n" nil t) + (forward-char -1) + (goto-char (point-max))) + (insert (format (concat nnfolder-article-marker "%d %s\n") + (cdr group-art) (current-time-string))))) (defun nnfolder-active-number (group) ;; Find the next article number in GROUP. --=-=-=--