From: Shenghuo ZHU <zsh@cs.rochester.edu>
Subject: Re: strange behaviour when `B c'ing an empty article
Date: 07 Oct 1999 17:15:57 -0400 [thread overview]
Message-ID: <5bn1tuan3m.fsf@giga.cs.rochester.edu> (raw)
In-Reply-To: Dan Christensen's message of "Thu, 07 Oct 1999 11:37:07 -0400"
[-- Attachment #1: Type: text/plain, Size: 710 bytes --]
>>>>> "Dan" == Dan Christensen <jdc@jhu.edu> writes:
[...]
Dan> So the test8 article still triggers a bug?
Dan> /home/jdc/Gnus/Mail/test8:Xref: scratchy Inbox:10385
Dan> /home/jdc/Gnus/Mail/test9:Xref: scratchy test9:1
Dan> (The test8 one is the empty one, and both were copied with `B c'.
Dan> To be honest, it seems to me that the test8 article's Xref is
Dan> better than the test9 article's Xref, but I'm not really sure
Dan> what's supposed to happen.)
[...]
It is a bug. The same about the line number.
Fixed and committed.
--
Shenghuo ZHU
1999-10-07 17:09:34 Shenghuo ZHU <zsh@cs.rochester.edu>
* nnmail.el (nnmail-insert-xref): Dealing with empty article.
(nnmail-insert-lines): Ditto.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 97-109.diff --]
[-- Type: text/x-patch, Size: 2383 bytes --]
Index: nnmail.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v
retrieving revision 5.39
diff -u -r5.39 nnmail.el
--- nnmail.el 1999/09/27 15:19:04 5.39
+++ nnmail.el 1999/10/07 21:12:27
@@ -999,35 +999,39 @@
(let (lines chars)
(save-excursion
(goto-char (point-min))
- (when (search-forward "\n\n" nil t)
- (setq chars (- (point-max) (point)))
- (setq lines (count-lines (point) (point-max)))
- (forward-char -1)
- (save-excursion
- (when (re-search-backward "^Lines: " nil t)
- (delete-region (point) (progn (forward-line 1) (point)))))
- (beginning-of-line)
- (insert (format "Lines: %d\n" (max lines 0)))
- chars))))
+ (unless (search-forward "\n\n" nil t)
+ (goto-char (point-max))
+ (insert "\n"))
+ (setq chars (- (point-max) (point)))
+ (setq lines (count-lines (point) (point-max)))
+ (forward-char -1)
+ (save-excursion
+ (when (re-search-backward "^Lines: " nil t)
+ (delete-region (point) (progn (forward-line 1) (point)))))
+ (beginning-of-line)
+ (insert (format "Lines: %d\n" (max lines 0)))
+ chars)))
(defun nnmail-insert-xref (group-alist)
"Insert an Xref line based on the (group . article) alist."
(save-excursion
(goto-char (point-min))
- (when (search-forward "\n\n" nil t)
- (forward-char -1)
- (when (re-search-backward "^Xref: " nil t)
- (delete-region (match-beginning 0)
- (progn (forward-line 1) (point))))
- (insert (format "Xref: %s" (system-name)))
- (while group-alist
- (insert (format " %s:%d"
- (mm-encode-coding-string
- (caar group-alist)
- nnmail-pathname-coding-system)
- (cdar group-alist)))
- (setq group-alist (cdr group-alist)))
- (insert "\n"))))
+ (unless (search-forward "\n\n" nil t)
+ (goto-char (point-max))
+ (insert "\n"))
+ (forward-char -1)
+ (when (re-search-backward "^Xref: " nil t)
+ (delete-region (match-beginning 0)
+ (progn (forward-line 1) (point))))
+ (insert (format "Xref: %s" (system-name)))
+ (while group-alist
+ (insert (format " %s:%d"
+ (mm-encode-coding-string
+ (caar group-alist)
+ nnmail-pathname-coding-system)
+ (cdar group-alist)))
+ (setq group-alist (cdr group-alist)))
+ (insert "\n")))
;;; Message washing functions
next prev parent reply other threads:[~1999-10-07 21:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-06 20:57 Dan Christensen
1999-10-06 23:24 ` Shenghuo ZHU
1999-10-07 0:26 ` Dan Christensen
1999-10-07 3:20 ` Shenghuo ZHU
1999-10-07 5:07 ` Dan Christensen
1999-10-07 5:51 ` Shenghuo ZHU
1999-10-07 15:37 ` Dan Christensen
1999-10-07 21:15 ` Shenghuo ZHU [this message]
1999-10-07 21:44 ` Dan Christensen
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=5bn1tuan3m.fsf@giga.cs.rochester.edu \
--to=zsh@cs.rochester.edu \
/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).