Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: info-gnus-english@gnu.org
Subject: Re: How to use gnus-summary-universal-argument
Date: Fri, 19 Mar 2010 14:26:42 -0500	[thread overview]
Message-ID: <87r5ng5czx.fsf@lifelogs.com> (raw)
In-Reply-To: <87y6i0tfnd.fsf@linux-lqcw.site>

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	other threads:[~2010-03-19 19:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10  8:54 Cecil Westerhof
2010-03-10 13:32 ` Ted Zlatanov
2010-03-10 14:28   ` Cecil Westerhof
2010-03-19 19:26     ` Ted Zlatanov [this message]
2010-03-19 10:39 ` Leonidas Tsampros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r5ng5czx.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).