From: Shenghuo ZHU <zsh@cs.rochester.edu>
Subject: patch: \201 when cache (was: bug: \201 in summary buffer)
Date: 02 May 1999 01:34:35 -0400 [thread overview]
Message-ID: <2nvhecvxuc.fsf_-_@zsh.cs.rochester.edu> (raw)
In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "17 Apr 1999 15:36:19 +0200"
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
When I enter an article with non-ASCII in subject to cache, \201
appears in summary buffer when I reenter the group. The reason is that
gnus-cache-possibly-enter-article uses the existing headers which may
contain mule characters. I guess this may also cause Kai's bug.
Here are two patches. The first forces
gnus-cache-possibly-enter-article to re-parse the headers. The second
does a deep clean job, removing parameter `headers' of
gnus-cache-possibly-enter-article.
--
Shenghuo ZHU
Sun May 2 00:55:54 1999 Shenghuo ZHU <zsh@cs.rochester.edu>
* gnus-cache.el (gnus-cache-possibly-enter-article): Re-parse header.
[-- Attachment #2: 84-zsh1.diff --]
[-- Type: application/octet-stream, Size: 435 bytes --]
--- gnus-cache.el 1999/05/02 04:41:44 1.1
+++ gnus-cache.el 1999/05/02 04:50:14
@@ -183,6 +183,8 @@
(gnus-request-article-this-buffer number group))
(when (> (buffer-size) 0)
(gnus-write-buffer file)
+ (setq headers (nnheader-parse-head t))
+ (mail-header-set-number headers number)
(gnus-cache-change-buffer group)
(set-buffer (cdr gnus-cache-buffer))
(goto-char (point-max))
[-- Attachment #3: Type: text/plain, Size: 359 bytes --]
Sun May 2 01:00:02 1999 Shenghuo ZHU <zsh@cs.rochester.edu>
* gnus-cache.el (gnus-cache-possibly-enter-article): Remove
parameter `headers'.
(gnus-cache-enter-article): Ditto.
(gnus-cache-update-article): Ditto.
* gnus-sum.el (gnus-summary-move-article): Ditto.
(gnus-summary-mark-article-as-unread): Ditto.
(gnus-summary-mark-article): Ditto.
[-- Attachment #4: 84-zsh2.diff --]
[-- Type: application/octet-stream, Size: 2871 bytes --]
--- gnus-sum.el 1999/05/02 05:02:05 1.1
+++ gnus-sum.el 1999/05/02 05:03:51
@@ -7233,10 +7233,6 @@
(when gnus-use-cache
(gnus-cache-possibly-enter-article
to-group to-article
- (let ((header (copy-sequence
- (gnus-summary-article-header article))))
- (mail-header-set-number header to-article)
- header)
(memq article gnus-newsgroup-marked)
(memq article gnus-newsgroup-dormant)
(memq article gnus-newsgroup-unreads)))
@@ -7904,7 +7900,6 @@
(save-excursion
(gnus-cache-possibly-enter-article
gnus-newsgroup-name article
- (gnus-summary-article-header article)
(= mark gnus-ticked-mark)
(= mark gnus-dormant-mark) (= mark gnus-unread-mark))))
@@ -7950,7 +7945,6 @@
(save-excursion
(gnus-cache-possibly-enter-article
gnus-newsgroup-name article
- (gnus-summary-article-header article)
(= mark gnus-ticked-mark)
(= mark gnus-dormant-mark) (= mark gnus-unread-mark))))
--- gnus-cache.el 1999/05/02 04:57:16 1.2
+++ gnus-cache.el 1999/05/02 05:09:20
@@ -145,20 +145,17 @@
(setq gnus-cache-buffer nil))))
(defun gnus-cache-possibly-enter-article
- (group article headers ticked dormant unread &optional force)
+ (group article ticked dormant unread &optional force)
(when (and (or force (not (eq gnus-use-cache 'passive)))
(numberp article)
- (> article 0)
- (vectorp headers)) ; This might be a dummy article.
- ;; If this is a virtual group, we find the real group.
- (when (gnus-virtual-group-p group)
- (let ((result (nnvirtual-find-group-art
- (gnus-group-real-name group) article)))
- (setq group (car result)
- headers (copy-sequence headers))
- (mail-header-set-number headers (cdr result))))
- (let ((number (mail-header-number headers))
- file)
+ (> article 0)) ; This might be a dummy article.
+ (let ((number article) file headers)
+ ;; If this is a virtual group, we find the real group.
+ (when (gnus-virtual-group-p group)
+ (let ((result (nnvirtual-find-group-art
+ (gnus-group-real-name group) article)))
+ (setq group (car result)
+ number (cdr result))))
(when (and number
(> number 0) ; Reffed article.
(or force
@@ -332,7 +329,6 @@
(if (natnump article)
(when (gnus-cache-possibly-enter-article
gnus-newsgroup-name article
- (gnus-summary-article-header article)
nil nil nil t)
(push article out))
(gnus-message 2 "Can't cache article %d" article))
@@ -428,7 +424,7 @@
(when (gnus-cache-possibly-remove-article article nil nil nil t)
(let ((gnus-use-cache nil))
(gnus-cache-possibly-enter-article
- gnus-newsgroup-name article (gnus-summary-article-header article)
+ gnus-newsgroup-name article
nil nil nil t))))
(defun gnus-cache-possibly-remove-article (article ticked dormant unread
next prev parent reply other threads:[~1999-05-02 5:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-31 8:39 bug: \201 in summary buffer Vladimir Volovich
1999-03-31 13:24 ` Kai.Grossjohann
1999-04-17 5:37 ` Lars Magne Ingebrigtsen
1999-04-17 13:36 ` Kai.Grossjohann
1999-05-02 5:34 ` Shenghuo ZHU [this message]
1999-05-02 13:17 ` patch: \201 when cache (was: bug: \201 in summary buffer) Stainless Steel Rat
1999-05-02 14:27 ` François Pinard
1999-05-02 14:43 ` Stainless Steel Rat
1999-05-02 17:21 ` François Pinard
1999-05-03 16:04 ` Stainless Steel Rat
1999-05-02 14:54 ` Hrvoje Niksic
1999-05-02 16:46 ` Per Abrahamsen
1999-05-02 16:44 ` Shenghuo ZHU
1999-05-03 16:05 ` Stainless Steel Rat
1999-05-02 19:43 ` Kai.Grossjohann
1999-05-03 16:13 ` Stainless Steel Rat
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=2nvhecvxuc.fsf_-_@zsh.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).