From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/13937 Path: news.gmane.org!not-for-mail From: Leonidas Tsampros Newsgroups: gmane.emacs.gnus.user Subject: Re: How to use gnus-summary-universal-argument Date: Fri, 19 Mar 2010 12:39:06 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: <87d3z0ppdh.fsf@upnet.gr> References: <87bpewv9p3.fsf@linux-lqcw.site> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1273156017 26119 80.91.229.12 (6 May 2010 14:26:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 May 2010 14:26:57 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Thu May 06 16:26:56 2010 connect(): No such file or directory Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OA228-0004uf-Ml for gegu-info-gnus-english@m.gmane.org; Thu, 06 May 2010 16:26:50 +0200 Original-Received: from localhost ([127.0.0.1]:46368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA21u-00021A-EP for gegu-info-gnus-english@m.gmane.org; Thu, 06 May 2010 10:26:22 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:kYBpPsyFzr0qCBGc8+g6gV+hE/U= Original-Lines: 51 Original-NNTP-Posting-Host: 212.205.17.3 Original-X-Trace: news.sunsite.dk DXC=j^bO]M6lhkCSi^`20K04QCYSB=nbEKnkKeNY?2Q_`=\KR5Ui[3; d09B6ij\E?4K7iBAg; b=Tf_cKMS]8_YlGBl4NU@>CVaWM^@J Original-X-Complaints-To: staff@sunsite.dk Original-Xref: usenet.stanford.edu gnu.emacs.gnus:84144 X-Mailman-Approved-At: Wed, 05 May 2010 21:10:56 -0400 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:13937 Archived-At: Cecil Westerhof 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?