Gnus development mailing list
 help / color / mirror / Atom feed
* Piping an article, imap numbering
@ 2005-09-05 12:24 Alexander Kotelnikov
  2005-09-05 12:35 ` nntps still hangs | " Alexander Kotelnikov
  2005-09-05 13:43 ` Reiner Steib
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Kotelnikov @ 2005-09-05 12:24 UTC (permalink / raw)


Hello.

I have a mailbox for mail which was not splitted anywhere and probably
(and almost always) is spam. So once a certain period I want all this
mail to be piped to "sa-learn --spam", marked as read and moved to a
spam mailbox (I do not delete them in case of mistake). I wrote a
function that helps me but I believe it is not completely elegant:

(defun my-gnus-sa-learn-and-move(&optional n)
  ""
  (interactive "p")
  (mapc
   (lambda (n)
     (gnus-summary-goto-article n)
     (gnus-summary-show-article t)
     (gnus-summary-save-in-pipe "sa-learn --spam")
     (gnus-summary-move-article 1 "nnimap+myxomop:INBOX.spam")
     )
   (gnus-summary-work-articles n)
   )
  (delete-other-windows)
)
(add-hook 'gnus-summary-mode-hook
          '(lambda ()
             (define-key gnus-summary-mode-map "\C-cs"
               'my-gnus-sa-learn-and-move)))

What I do not like here:
1. I found 4 functions for piping messages:
   gnus-summary-save-in-pipe, (defined in gnus-art.el!)
   gnus-summary-pipe-output,
   gnus-summary-pipe-message,
   message-pipe-buffer-body
isn't it too much and too redundant?
2. None ot these functions accepts article number as an argument, so
one need to open an article first and then process it.

The other question is if I have an imap mailbox with several messages,
read them and delete, say, the last one, then after one more is
received *Group* shows '2' for corresponding group (and it is clear
why), but can I ask gnus to be more intelligent here?
--
Alexander Kotelnikov
Saint-Petersburg, Russia




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

* nntps still hangs | Re: Piping an article, imap numbering
  2005-09-05 12:24 Piping an article, imap numbering Alexander Kotelnikov
@ 2005-09-05 12:35 ` Alexander Kotelnikov
  2005-09-05 13:43 ` Reiner Steib
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Kotelnikov @ 2005-09-05 12:35 UTC (permalink / raw)


Sorry for disturbing you one more time on this problem, but sending
the previous article I faced it again. It really hurts!

Refer http://thread.gmane.org/gmane.emacs.gnus.general/60816 for the
full description.

Thanks,
-- 
Alexander Kotelnikov
Saint-Petersburg, Russia




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

* Re: Piping an article, imap numbering
  2005-09-05 12:24 Piping an article, imap numbering Alexander Kotelnikov
  2005-09-05 12:35 ` nntps still hangs | " Alexander Kotelnikov
@ 2005-09-05 13:43 ` Reiner Steib
  2005-09-06 11:50   ` Alexander Kotelnikov
  1 sibling, 1 reply; 4+ messages in thread
From: Reiner Steib @ 2005-09-05 13:43 UTC (permalink / raw)


On Mon, Sep 05 2005, Alexander Kotelnikov wrote:

> So once a certain period I want all this mail to be piped to
> "sa-learn --spam", marked as read and moved to a spam mailbox (I do
> not delete them in case of mistake). I wrote a function that helps
> me but I believe it is not completely elegant:
>
> (defun my-gnus-sa-learn-and-move(&optional n) [...]

I don't quite understand why people prefer to use their own functions
instead of using the Gnus builtin features, see (info
"(gnus)SpamAssassin back end") and more general (info "(gnus)Filtering
Spam Using The Spam ELisp Package").  If there are problems with the
code or the documentation, I'm quite sure the Ted is willing to
improve it.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: Piping an article, imap numbering
  2005-09-05 13:43 ` Reiner Steib
@ 2005-09-06 11:50   ` Alexander Kotelnikov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Kotelnikov @ 2005-09-06 11:50 UTC (permalink / raw)


>>>>> On Mon, 05 Sep 2005 15:43:23 +0200
>>>>> "RS" == Reiner Steib <reinersteib+gmane@imap.cc> wrote:
RS> 
RS> On Mon, Sep 05 2005, Alexander Kotelnikov wrote:
>> So once a certain period I want all this mail to be piped to
>> "sa-learn --spam", marked as read and moved to a spam mailbox (I do
>> not delete them in case of mistake). I wrote a function that helps
>> me but I believe it is not completely elegant:
>> 
>> (defun my-gnus-sa-learn-and-move(&optional n) [...]
RS> 
RS> I don't quite understand why people prefer to use their own functions
RS> instead of using the Gnus builtin features, see (info
RS> "(gnus)SpamAssassin back end")

O-op... I do not have such info section in Gnus v5.10.7
-- 
Alexander Kotelnikov
Saint-Petersburg, Russia




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

end of thread, other threads:[~2005-09-06 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-05 12:24 Piping an article, imap numbering Alexander Kotelnikov
2005-09-05 12:35 ` nntps still hangs | " Alexander Kotelnikov
2005-09-05 13:43 ` Reiner Steib
2005-09-06 11:50   ` Alexander Kotelnikov

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