* Mail Groups and Thread suggestion/question
@ 1995-11-29 16:54 Jason Schroeder
1995-11-29 22:59 ` Colin Rafferty
0 siblings, 1 reply; 5+ messages in thread
From: Jason Schroeder @ 1995-11-29 16:54 UTC (permalink / raw)
While using mail groups, is there a way to come across an article and add
it to another thread permanently?
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Mail Groups and Thread suggestion/question
1995-11-29 16:54 Mail Groups and Thread suggestion/question Jason Schroeder
@ 1995-11-29 22:59 ` Colin Rafferty
1995-11-30 10:21 ` Per Abrahamsen
0 siblings, 1 reply; 5+ messages in thread
From: Colin Rafferty @ 1995-11-29 22:59 UTC (permalink / raw)
Jason Schroeder writes:
> While using mail groups, is there a way to come across an article and add
> it to another thread permanently?
There are a bunch of really stupid mailers out there that don't know
about "References:". How many years has it been? I have been having
the same problems.
My temporary solution is is to copy the "Message-ID:" line from the
parent-to-be, and then insert it into the orphaned article, changed to
"References:".
This work perfectly under nnml (and I imagine, it would work under any
other scheme).
I guess the real solution would be to write some function that did this
automatically. I am thinking about something like this:
(defun gnus-summary-adopt-parent-thread (&optional which)
"Make current article child of the previous one.
With prefix arg, parent is that many articles previous."
(interactive "p")
; ...
)
--
Colin Rafferty | Merrill Lynch | Voice: 212.449.8782
Consultant | World Financial Center | E-Mail: craffert@ml.com
Securities Pricing | North Tower, 11 Floor | Beeper: 1.800.225.0256 #360229
Debt Markets Group | New York, New York 10281 | Fax: 212.449.1314
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Mail Groups and Thread suggestion/question
1995-11-29 22:59 ` Colin Rafferty
@ 1995-11-30 10:21 ` Per Abrahamsen
1995-12-01 3:57 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Per Abrahamsen @ 1995-11-30 10:21 UTC (permalink / raw)
Cc: ding
>>>>> "CR" == Colin Rafferty <craffert@sps.ml.com> writes:
CR> My temporary solution is is to copy the "Message-ID:" line from the
CR> parent-to-be, and then insert it into the orphaned article, changed to
CR> "References:".
Me too.
CR> I guess the real solution would be to write some function that did this
CR> automatically. I am thinking about something like this:
Go for it!
CR> (defun gnus-summary-adopt-parent-thread (&optional which)
CR> "Make current article child of the previous one.
CR> With prefix arg, parent is that many articles previous."
Well, instead of a prefix argument, I think it would be better to use
the process mark. I.e. if there is no process args, use the previous
article. If there is _a_ process marks, use that article as a parent.
If there is multiple process marks, signal an error.
Counting lines is something you do in vi, not Emacs.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Mail Groups and Thread suggestion/question
1995-11-30 10:21 ` Per Abrahamsen
@ 1995-12-01 3:57 ` Lars Magne Ingebrigtsen
1995-12-19 23:57 ` Colin Rafferty
0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1995-12-01 3:57 UTC (permalink / raw)
Per Abrahamsen <abraham@dina.kvl.dk> writes:
> CR> (defun gnus-summary-adopt-parent-thread (&optional which)
> CR> "Make current article child of the previous one.
> CR> With prefix arg, parent is that many articles previous."
>
> Well, instead of a prefix argument, I think it would be better to use
> the process mark. I.e. if there is no process args, use the previous
> article. If there is _a_ process marks, use that article as a parent.
> If there is multiple process marks, signal an error.
Yup, that's a good idea. If somebody wants to write the function and
submit a patch, I'll apply the patch. Ain't I helpful? :-)
--
Home is where the cat is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Mail Groups and Thread suggestion/question
1995-12-01 3:57 ` Lars Magne Ingebrigtsen
@ 1995-12-19 23:57 ` Colin Rafferty
0 siblings, 0 replies; 5+ messages in thread
From: Colin Rafferty @ 1995-12-19 23:57 UTC (permalink / raw)
Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
> Per Abrahamsen <abraham@dina.kvl.dk> writes:
>> Colin Rafferty <craffert@ml.com> writes:
>>> Jason Schroeder <shrode@wsc.com> writes:
>>>> While using mail groups, is there a way to come across an article and add
>>>> it to another thread permanently?
>>> There are a bunch of really stupid mailers out there that don't know
>>> about "References:". How many years has it been? I have been having
>>> the same problems.
>>> (defun gnus-summary-adopt-parent-thread (&optional which)
>>> "Make current article child of the previous one.
>>> With prefix arg, parent is that many articles previous."
>> Well, instead of a prefix argument, I think it would be better to use
>> the process mark.
> Yup, that's a good idea. If somebody wants to write the function and
> submit a patch, I'll apply the patch. Ain't I helpful? :-)
I would like to thank Jason Schroeder <shrode@wsc.com> for the kick in
the ass to get me started on this code. I would also like to thank Per
Abrahamsen <abraham@dina.kvl.dk> for pointing out using the
process-mark:
"Counting lines is something you do in vi, not Emacs."
Anyway, here is gnus-summary-reparent-thread.el (bound to T ^). It does
not change the threading pattern during the group visit, and it will
mark the child article as read. I have not been hacking Gnus since last
year, so I don't know all the correct functions.
Here it is:
(require 'gnus)
(provide 'gnus-reparent)
(define-key gnus-summary-thread-map "^" 'gnus-summary-reparent-thread)
(defun gnus-summary-reparent-thread ()
"Make current article child of the marked (or previous) article.
Note that the re-threading will only work if `gnus-thread-ignore-subject'
is non-nil or the Subject: of both articles are the same.
The change will not be visible until the next group retrieval."
(interactive)
(or (not (gnus-group-read-only-p))
(error "The current newsgroup does not support article editing."))
(or (<= (length gnus-newsgroup-processable) 1)
(error "No more than one article may be marked."))
(save-window-excursion
(let ((gnus-article-buffer " *reparent*")
(current-article (gnus-summary-article-number))
; first grab the marked article, otherwise one line up.
(parent-article (if (not (null gnus-newsgroup-processable))
(car gnus-newsgroup-processable)
(save-excursion
(if (eq (forward-line -1) 0)
(gnus-summary-article-number)
(error "Beginning of summary buffer."))))))
(or (not (eq current-article parent-article))
(error "An article may not be self-referential."))
(let ((message-id (mail-header-id (gnus-get-header-by-num
parent-article))))
(or (and message-id (not (equal message-id "")))
(error "No message-id in desired parent."))
(gnus-summary-select-article t t nil current-article)
(set-buffer gnus-article-buffer)
(setq buffer-read-only nil)
(let ((buf (buffer-substring-no-properties (point-min) (point-max))))
(erase-buffer)
(insert buf))
(goto-char (point-min))
(if (search-forward-regexp "^References: " nil t)
(insert message-id " " )
(insert "References: " message-id "\n"))
(or (gnus-request-replace-article current-article
(car gnus-article-current)
gnus-article-buffer)
(error "Couldn't replace article."))
(set-buffer gnus-summary-buffer)
(gnus-summary-unmark-all-processable)
(message "Article %d is now the child of article %d."
current-article parent-article)
))))
; Colin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1995-12-19 23:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-11-29 16:54 Mail Groups and Thread suggestion/question Jason Schroeder
1995-11-29 22:59 ` Colin Rafferty
1995-11-30 10:21 ` Per Abrahamsen
1995-12-01 3:57 ` Lars Magne Ingebrigtsen
1995-12-19 23:57 ` Colin Rafferty
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).