From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/3279 Path: news.gmane.org!not-for-mail From: marc0@autistici.org (Marco Parrone (marc0)) Newsgroups: gmane.emacs.gnus.user Subject: resend via news Date: Tue, 16 Dec 2003 04:02:15 +0100 Message-ID: <87y8tdzcqw.fsf@marc0.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669454 18394 80.91.229.2 (31 Jan 2006 01:04:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:04:14 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:31:58 2006 Original-Path: quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: host60-203.pool8248.interbusiness.it Original-X-Trace: quimby.gnus.org 1071543901 11992 82.48.203.60 (16 Dec 2003 03:05:01 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Tue, 16 Dec 2003 03:05:01 +0000 (UTC) X-Face: ]KIe+0@lNbQo2y\ey;]!*LKsR-0$V737yt[BnA*)c,)gu>IH>S}:"PPNWkV<}[ usLa_gJyB!BRUEC!~5OY;:`k1Tcv2g2<0|,'RI}ZhnPpaXC.,L^y?}R&FfrRiLE*b+AE, JY/a! `/ZN{E`NgLO_QV#s`!,#M%ppv@mcIb`K^/1``d^=o"AvteN1nNFyzU 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)