[Mew-dist 05846] "In-Reply-To" and "References" fields
Toshio HORI
toshi at example.com
1998年 8月 7日 (金) 03:59:18 JST
現在Mewでreply mailを書く際に、defaultでIn-Reply-ToおよびReferencesの
fieldに入るのは「現在直接replyしているmail」のmessage-IDだけです。
しかし、RFC822には
-----
4.6. REFERENCE FIELDS
[略]
4.6.2. IN-REPLY-TO
The contents of this field identify previous correspon-
dence which this message answers. Note that if message iden-
tifiers are used in this field, they must use the msg-id
specification format.
4.6.3. REFERENCES
The contents of this field identify other correspondence
which this message references. Note that if message identif-
iers are used, they must use the msg-id specification format.
-----
と書いてあります。これに従うと、複数のmessageで構成されたthreadの中の、
あるmailに返事を書く際には
- In-Reply-Toには「現在直接replyしているmail」のmessage-IDを入れる
- Referencesには「いま書いているmail」で参照している、他のmailの
message-IDを入れる
という動作(*)が期待されているようです(堀の理解では)。また、ここでは引
用しませんが、NetNewsに関するRFC1036ではもっと詳細にReferencesの形式が
指定されています(RFC1036の2.2.5節)。
…というわけで、将来の(?)NetNews supportも視野に入れてmew-draft-header
の引数を一つ増やし、(*)に示したような動作をするようにmew-draft.elと
mew-summary.el(およびcontrib/mew-gnus.el)に以下のpatchを反映してもらえ
ませんか?
# threadingをsupportしているMail/News readerを使っている人も嬉しいはず。
// 堀 俊夫 / toshi at example.com
// 電子技術総合研究所 知能システム部
// Home : http://www.etl.go.jp/~toshi/
-------------- next part --------------
--- mew-draft.el.toshi Thu Aug 6 16:54:17 1998
+++ mew-draft.el Fri Aug 7 03:22:14 1998
@@ -493,7 +493,7 @@
del)))
(string-match ":;" c))))
-(defun mew-draft-header (&optional subject nl to cc newsgroups in-reply-to references)
+(defun mew-draft-header (&optional subject nl to cc newsgroups in-reply-to message-id references)
;; to -- string or list
;; cc -- string or list
;; nl -- one empty line under "----", which is necessary if
@@ -566,9 +566,9 @@
(mew-header-insert-here "Dcc:" mew-dcc)
(mew-header-insert-here "Reply-To:" mew-reply-to)
(if in-reply-to
- (if references
+ (if message-id
(setq in-reply-to (concat "Your message of \""
- in-reply-to "\"\n\t" references))
+ in-reply-to "\"\n\t" message-id))
(setq in-reply-to (concat "Your message of \"" in-reply-to "\""))))
(mew-header-insert-here "In-Reply-To:" in-reply-to)
(mew-header-insert-here "References:" references)
--- mew-summary.el.toshi Tue Aug 4 21:10:32 1998
+++ mew-summary.el Thu Aug 6 16:57:54 1998
@@ -1032,7 +1032,7 @@
(file (mew-folder-new-message mew-draft-folder))
(find-file-hooks nil)
(inhibit-quit t)
- from to cc newsgroups subject in-reply-to references
+ from to cc newsgroups subject in-reply-to message-id references
cbuf)
(mew-summary-prepare-draft
(if (get-buffer (mew-buffer-message))
@@ -1084,11 +1084,15 @@
(if (and subject (not (string-match mew-reply-regex subject)))
(setq subject (concat mew-reply-string subject)))
(setq in-reply-to (mew-header-get-value "Date:"))
- (setq references (mew-header-get-value "Message-ID:"))
+ (setq message-id (mew-header-get-value "Message-ID:"))
+ (setq references (mew-header-get-value "References:"))
+ (if (stringp references)
+ (setq references (concat references "\n\t" message-id))
+ (setq references message-id))
)
;;
(mew-pop-to-buffer cbuf) ;; draft
- (mew-draft-header subject nil to cc newsgroups in-reply-to references)
+ (mew-draft-header subject nil to cc newsgroups in-reply-to message-id references)
(cond
((eq mew-summary-reply-position 'body)
(goto-char (mew-header-end))
-------------- next part --------------
--- contrib/mew-gnus.el.toshi Thu Aug 6 17:02:08 1998
+++ contrib/mew-gnus.el Thu Aug 6 17:02:31 1998
@@ -110,8 +110,8 @@
(save-excursion
(mew-set-environment)))
(let ((file (mew-folder-new-message mew-draft-folder))
- from cc subject date to reply-to newsgroups in-reply-to references
- distribution)
+ from cc subject date to reply-to newsgroups in-reply-to message-id
+ references distribution)
(if (null mew-mail-path) (mew-init))
(mew-current-set 'window (current-window-configuration))
(delete-other-windows)
@@ -135,12 +135,21 @@
(gnus-fetch-field "Newsgroups"))
date (gnus-fetch-field "Date")
in-reply-to (mew-header-get-value "Date:")
- references (mew-header-get-value "Message-ID:")
+ message-id (mew-header-get-value "Message-ID:")
+ references (mew-header-get-value "References:")
distribution (gnus-fetch-field "Distribution"))
+ (if (stringp references)
+ (setq references (concat references "\n\t" message-id))
+ (setq references message-id))
(switch-to-buffer-other-window (find-file-noselect file))
(mew-draft-rename file)
- (mew-draft-header subject nil to cc newsgroups in-reply-to references)
+ (mew-draft-header subject nil to cc newsgroups in-reply-to message-id references)
(mew-draft-mode) ;; for hilight
+ (save-excursion
+ (goto-char (point-min))
+ (search-forward "X-Mailer:")
+ (beginning-of-line)
+ (insert (concat "X-Newsreader: " gnus-version "\n")))
(if (stringp distribution)
(save-excursion
(goto-char (point-min))
Mew-dist メーリングリストの案内