+2004-06-14 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * nnheader.el (nnheader-generate-fake-message-id): accept a
+ number and build a fake message ID localized to a group and
+ article number (so it's repeatable from that point on)
+ (nnheader-fake-message-id-p): change regex to accomodate new fake
+ ID format
+
+ * gnus-sum.el (gnus-get-newsgroup-headers): call
+ nnheader-generate-fake-message-id with the article number
+
2004-06-12 YAGI Tatsuya <ynyaaa@ybb.ne.jp> (tiny change)
* gnus-art.el (gnus-article-next-page): Fix the way to find a real
(or dependencies
(with-current-buffer gnus-summary-buffer
gnus-newsgroup-dependencies)))
- headers id end ref
+ headers id end ref number
(mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets
(save-excursion (condition-case nil
(make-full-mail-header
;; Number.
(prog1
- (read cur)
+ (setq number (read cur))
(end-of-line)
(setq p (point))
(narrow-to-region (point)
(match-end 1))
;; If there was no message-id, we just fake one
;; to make subsequent routines simpler.
- (nnheader-generate-fake-message-id))))
+ (nnheader-generate-fake-message-id number))))
;; References.
(progn
(goto-char p)
(defvar nnheader-fake-message-id 1)
-(defsubst nnheader-generate-fake-message-id ()
- (concat "fake+none+" (int-to-string (incf nnheader-fake-message-id))))
+(defsubst nnheader-generate-fake-message-id (&optional number)
+ (if (numberp number)
+ (format "fake+none+%s+%d" gnus-newsgroup-name number)
+ (format "fake+none+%s+%s"
+ gnus-newsgroup-name
+ (int-to-string (incf nnheader-fake-message-id)))))
(defsubst nnheader-fake-message-id-p (id)
(save-match-data ; regular message-id's are <.*>
- (string-match "\\`fake\\+none\\+[0-9]+\\'" id)))
+ (string-match "\\`fake\\+none\\+.*\\+[0-9]+\\'" id)))
;; Parsing headers and NOV lines.
(or (search-forward ">" (point-at-eol) t) (point)))
;; If there was no message-id, we just fake one to make
;; subsequent routines simpler.
- (nnheader-generate-fake-message-id)))
+ (nnheader-generate-fake-message-id number)))
;; References.
(progn
(goto-char p)
out)))
out))
-(defmacro nnheader-nov-read-message-id ()
+(defmacro nnheader-nov-read-message-id (&optional number)
'(let ((id (nnheader-nov-field)))
(if (string-match "^<[^>]+>$" id)
id
- (nnheader-generate-fake-message-id))))
+ (nnheader-generate-fake-message-id number))))
(defun nnheader-parse-nov ()
- (let ((eol (point-at-eol)))
+ (let ((eol (point-at-eol))
+ (number (nnheader-nov-read-integer)))
(make-full-mail-header
- (nnheader-nov-read-integer) ; number
+ number ; number
(nnheader-nov-field) ; subject
(nnheader-nov-field) ; from
(nnheader-nov-field) ; date
- (nnheader-nov-read-message-id) ; id
+ (nnheader-nov-read-message-id number) ; id
(nnheader-nov-field) ; refs
(nnheader-nov-read-integer) ; chars
(nnheader-nov-read-integer) ; lines