From: Leonidas Tsampros <ltsampros@upnet.gr>
To: info-gnus-english@gnu.org
Subject: Re: How to use gnus-summary-universal-argument
Date: Fri, 19 Mar 2010 12:39:06 +0200 [thread overview]
Message-ID: <87d3z0ppdh.fsf@upnet.gr> (raw)
In-Reply-To: <87bpewv9p3.fsf@linux-lqcw.site>
Cecil Westerhof <Cecil@decebal.nl> writes:
> I move spam message from different places to a certain folder to be
> processed. I like them to be easily marked as read. I can do this with:
> M P A
> M-&
> d
> but I am a real programmer and lazy: I do not want to do what I can let
> the computer do. ;-]
Hi Cecil,
Usually, the way I marked spam was simply by using B m
(gnus-summary-move-article) and have them moved to my nnml:mail.junk
directory. B m works either with numerical prefixes or with process
marks. This is how I achieved a little bit of automation:
(defun gnus-move-to-junk (&optional n)
(interactive "P")
(gnus-summary-move-article n "nnml:mail.junk" nil 'move))
(add-hook 'gnus-startup-hook
'(lambda ()
(define-key gnus-summary-mode-map (kbd "j") 'gnus-move-to-junk)))
I remapped the 'j' key as I never used the defualt goto-article
command.
Hope this helps!
> So I started writing the following function:
> (defun gnus-summary-mark-all-messages-as-read ()
> "If in gnus-summary-mode mark all messages as read"
> (interactive)
> (if (not (equal major-mode 'gnus-summary-mode))
> (message "This function can only be used in gnus-summary-mode")
> (gnus-uu-mark-all)
> (gnus-summary-universal-argument 'gnus-summary-mark-as-read-forward)))
>
> This does not work. The description of gnus-summary-universal-argument
> is:
> gnus-summary-universal-argument is an interactive compiled Lisp
> function.
>
> (gnus-summary-universal-argument ARG)
>
> Perform any operation on all articles that are process/prefixed.
>
> How do I need to define the argument to let this work?
>
> On a side note: what would be a good key to bind this function to?
prev parent reply other threads:[~2010-03-19 10:39 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
2010-03-19 10:39 ` Leonidas Tsampros [this message]
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=87d3z0ppdh.fsf@upnet.gr \
--to=ltsampros@upnet.gr \
--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).