Gnus development mailing list
 help / color / mirror / Atom feed
* Using Message-ID for reply splitting into groups
@ 2002-06-01  2:03 Nelson Ferreira
  2002-06-01  5:44 ` Nelson Ferreira
  2002-06-02  8:27 ` Kai Großjohann
  0 siblings, 2 replies; 3+ messages in thread
From: Nelson Ferreira @ 2002-06-01  2:03 UTC (permalink / raw)




Hi all.

Did anyone ever tried to cook the Message-ID field so that you can split
an incoming reply to mail you posted (or a reply), to the group where the
you composed the original from ?

I was thinking of something of the likes of adding a personal key plus the
group name, so that either fancy-splitting or procmail would know which 
group to put it too.

I would also enable this only if gcc-self is t.

I know I would have to thinker with message-make-fdqn or message-make-message-id...

What is the right way to do it, or is this a very dumb move ?

Thanks,

        Nelson

-- 
Nelson Ferreira



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using Message-ID for reply splitting into groups
  2002-06-01  2:03 Using Message-ID for reply splitting into groups Nelson Ferreira
@ 2002-06-01  5:44 ` Nelson Ferreira
  2002-06-02  8:27 ` Kai Großjohann
  1 sibling, 0 replies; 3+ messages in thread
From: Nelson Ferreira @ 2002-06-01  5:44 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 672 bytes --]


In reply to my own message, I'm posting a patch to message.el in
message-make-message-id that concats the header X-Msgid-Archive-Tag
to the Message-ID contacts if it is present.

This allows me to do the following in my .gnus:

(defun njsf-define-msg-id-tag-field nil
  ""
  (if (and (message-mail-p) (length gnus-newsgroup-name))
      (let ((tag (concat "_---_xmat_-" 
			 gnus-newsgroup-name) 
			 "_---")))
	(save-excursion
	  (message-narrow-to-headers)
	  (message-fill-header 'X-Msgid-Archive-Tag tag)
	  (widen)
	  ))))
(add-hook 'message-send-hook 'njsf-define-msg-id-tag-field)

Anybody has any comments, improvements or objections ?

Regards,

        Nelson


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: MsgId split tag --]
[-- Type: text/x-patch, Size: 592 bytes --]

Index: lisp/message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 6.228
diff -u -r6.228 message.el
--- lisp/message.el	2002/04/21 02:42:45	6.228
+++ lisp/message.el	2002/06/01 06:01:30
@@ -3723,6 +3723,10 @@
 		 (and psupersedes
 		      (string-match "_-_@" psupersedes)))
 		"_-_" ""))
+	  (let ((msgid-arch-tag-p (message-fetch-field "x-msgid-archive-tag")))
+	    (if msgid-arch-tag-p
+		msgid-arch-tag-p
+	      ""))
 	  "@" (message-make-fqdn) ">"))
 
 (defvar message-unique-id-char nil)

[-- Attachment #3: Type: text/plain, Size: 849 bytes --]




"njsf" == Nelson Ferreira <nelson.ferreira@bigfoot.com> writes:

    njsf> Hi all.  Did anyone ever tried to cook the Message-ID field
    njsf> so that you can split an incoming reply to mail you posted
    njsf> (or a reply), to the group where the you composed the
    njsf> original from ?

    njsf> I was thinking of something of the likes of adding a
    njsf> personal key plus the group name, so that either
    njsf> fancy-splitting or procmail would know which group to put it
    njsf> too.

    njsf> I would also enable this only if gcc-self is t.

    njsf> I know I would have to thinker with message-make-fdqn or
    njsf> message-make-message-id...

    njsf> What is the right way to do it, or is this a very dumb move
    njsf> ?

    njsf> Thanks,

    njsf>         Nelson

    njsf> -- Nelson Ferreira

-- 
Nelson Ferreira

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using Message-ID for reply splitting into groups
  2002-06-01  2:03 Using Message-ID for reply splitting into groups Nelson Ferreira
  2002-06-01  5:44 ` Nelson Ferreira
@ 2002-06-02  8:27 ` Kai Großjohann
  1 sibling, 0 replies; 3+ messages in thread
From: Kai Großjohann @ 2002-06-02  8:27 UTC (permalink / raw)
  Cc: ding

Nelson Ferreira <nelson.ferreira@bigfoot.com> writes:

> Did anyone ever tried to cook the Message-ID field so that you can split
> an incoming reply to mail you posted (or a reply), to the group where the
> you composed the original from ?

Yes, but I did it wrong.  I added stuff the rhs (after "@") whereas it
should have been added to the lhs.  Can you fix that?

;; Insert token into message id
(defadvice message-make-fqdn (around group-token activate)
  "Insert a token for the current group into the message id."
  (let ((fqdn ad-do-it)
	(gcc (save-restriction
	       (message-narrow-to-headers-or-head)
	       (message-fetch-field "gcc"))))
    (cond ((and gcc
		(string-match "^nnimap:\\(.*\\)$" gcc))
	   (setq ad-return-value (concat (match-string 1 gcc)
					 ".tok."
					 fqdn)))
	  ((and gnus-newsgroup-name
		(string-match "^nnimap:\\(.*\\)$" gnus-newsgroup-name))
	   (setq ad-return-value (concat (match-string 1 gnus-newsgroup-name)
					 ".tok."
					 fqdn)))
	  (t (setq ad-return-value fqdn)))))

kai
-- 
Silence is foo!



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-06-02  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-01  2:03 Using Message-ID for reply splitting into groups Nelson Ferreira
2002-06-01  5:44 ` Nelson Ferreira
2002-06-02  8:27 ` Kai Großjohann

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).