* resend via news
@ 2003-12-16 3:02 Marco Parrone (marc0)
0 siblings, 0 replies; only message in thread
From: Marco Parrone (marc0) @ 2003-12-16 3:02 UTC (permalink / raw)
Hi all.
I need a function for re-sending an article, one equivalent to
gnus-summary-resend-message, but for news instead of mail.
It is needed to implement a set of gateways on top of Gnus [1].
I've not found such a function, if it does not exists I will
cannibalize/generalize at least `message-resend' and
`gnus-summary-resend-message'.
I'm also wondering if there is a way to make local bindings for
functions too in elisp, so that it will be possible to write something
like:
(let ((message-resend message-post-resend))
(gnus-summary-resend-message ...))
so that the call to `message-resend' into the
`gnus-summary-resend-message' function body will call
`message-post-resend'.
Thanks,
marc0
1.
;; Warning: the following code is work-in-progress, as now it is
;; fragile, buggy, not meant to be used.
;;
;; FIXME!: make it resending the articles instead of forwarding them.
;;
(defun auto-forward (source dest)
"auto-forward forwards all the new articles found in the source
group to the dest newsgroups.
The purpose of this function is to let to use
a properly configured Gnus as a mail-to-news gateway or
a rss-to-news gateway and alike.
For example, to forward articles from the `nnrss:bogus' group
to the `junk' newsgroup, use:
(auto-forward \"nnrss:bogus\" \"junk\")
"
(with-current-buffer "*Group*"
(beginning-of-buffer)
(if (search-forward source nil t)
(progn
(gnus-group-select-group nil)
(with-current-buffer (concat "*Summary " source "*")
(beginning-of-buffer)
(while (search-forward-regexp "^ \\. \\[" nil t)
(gnus-summary-post-forward)
(with-current-buffer "*posting*"
(insert dest)
(message-send-and-exit))
(gnus-summary-mark-article-as-forwarded
(gnus-summary-article-number)))
(gnus-summary-exit))))))
--
Marco Parrone (marc0) - marc0@autistici.org
2143 9E77 D5E6 115A 48AD A170 D0EE F736 (4E88 99C2)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-12-16 3:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-16 3:02 resend via news Marco Parrone (marc0)
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).