info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use gnus-summary-universal-argument


From: Ted Zlatanov
Subject: Re: How to use gnus-summary-universal-argument
Date: Tue, 04 May 2010 15:47:17 -0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.91 (gnu/linux)

On Wed, 10 Mar 2010 15:28:22 +0100 Cecil Westerhof <Cecil@decebal.nl> wrote: 

CW> Ted Zlatanov <tzz@lifelogs.com> writes:
CW> I move spam message from different places to a certain folder to be
CW> processed. I like them to be easily marked as read. I can do this with:
CW> M P A
CW> M-&
CW> d
CW> but I am a real programmer and lazy: I do not want to do what I can let
CW> the computer do. ;-]
>> 
>> I assume you're not using spam.el, because it can do this for you?

CW> No, I did not know it. I'll look into it. But still I like to know how
CW> to use gnus-summary-universal-argument. Maybe spam.el will do what I
CW> want, but if not (or if I want to use the function for something else)
CW> it would be nice to know how to use it.

Leonidas gave you a specific answer, but in general you should not use
g-s-u-argument in programs.  It's meant for interactive use.
Specifically, it asks the user for a keystroke and then looks up what
the keystroke means (via `key-binding') in the summary mode keymap.

Now if you want to programmatically do something on all the articles,
that's not hard but it depends on the specific function.  Some take
multiple articles and you can just pass them the return values of
`gnus-summary-work-articles' or let them call it themselves.  Some don't
and you have to loop on all the articles and later remove the process
mark.

If you want to programmatically copy or move articles you could look at
`spam-copy-or-move-routine' in spam.el.  It has some code for that
purpose.  You can also look at `gnus-summary-move-article' which will
work on all the process-marked articles (it does copy, move, and
crosspost).  That's the heart of Gnus' copy and move functionality.

HTH
Ted


reply via email to

[Prev in Thread] Current Thread [Next in Thread]