From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/23478 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE Newsgroups: gmane.emacs.gnus.general Subject: Re: some mail annoyances Date: 23 Jun 1999 09:39:23 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035161202 2191 80.91.224.250 (21 Oct 2002 00:46:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:46:42 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id DAA01018 for ; Wed, 23 Jun 1999 03:40:57 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id CAB13115; Wed, 23 Jun 1999 02:40:17 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 23 Jun 1999 02:41:07 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id CAA22374 for ; Wed, 23 Jun 1999 02:40:57 -0500 (CDT) Original-Received: from waldorf.cs.uni-dortmund.de (waldorf.cs.uni-dortmund.de [129.217.4.42]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id DAA01011 for ; Wed, 23 Jun 1999 03:39:57 -0400 (EDT) Original-Received: from petty.cs.uni-dortmund.de (petty.cs.uni-dortmund.de [129.217.20.161]) by waldorf.cs.uni-dortmund.de with SMTP id JAA03081 for ; Wed, 23 Jun 1999 09:39:25 +0200 (MES) Original-Received: (grossjoh@localhost) by petty.cs.uni-dortmund.de id JAA28783; Wed, 23 Jun 1999 09:39:24 +0200 Original-To: ding@gnus.org In-Reply-To: Harry Putnam's message of "22 Jun 1999 05:00:53 -0700" Original-Lines: 59 User-Agent: Gnus/5.070088 (Pterodactyl Gnus v0.88) Emacs/20.3.10 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:23478 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:23478 Harry Putnam writes: > Kai.Grossjohann@CS.Uni-Dortmund.DE writes: > > > Hm. In the past, I have set up Gnus for a couple of people as > > follows: when a mail is selected, it is automatically ticked, and > > total-expire is turned on. > > Kai, Is the auto ticking done by some existing functionality in gnus? Well... There is a variable gnus-mark-article-hook which is normally set to (gnus-summary-mark-unread-as-read). I defined my own function for this: (defun kai-gnus-mark-article-hook () (if (and (not (or (memq gnus-current-article gnus-newsgroup-marked) (memq gnus-current-article gnus-newsgroup-dormant) (memq gnus-current-article gnus-newsgroup-expirable) (memq gnus-current-article gnus-newsgroup-ancient) (memq gnus-current-article gnus-newsgroup-reads)))) (if (kai-gnus-newsgroup-style-group gnus-newsgroup-name) (gnus-summary-mark-unread-as-read) (gnus-summary-mark-as-dormant 1)))) I enabled this function with: (setq gnus-mark-article-hook (list 'kai-gnus-mark-article-hook)) Now, what does kai-gnus-mark-article-hook do? Well, it does not do anything if the article is alread ticked or dormant or expirable or ancient or read. But if the article is fresh, it sees whether the current group is a `newsgroup style group'. If so, the article is marked as read (as is normal in a newsgroup). Else, the article is marked as dormant. (Of course, you can replace gnus-summary-mark-as-dormant with gnus-summary-mark-as-unread-forward to tick the message.) What's missing? Well, the function kai-gnus-newsgroup-style-group which checks whether a group is a newsgroup style group. Here's a simple version: (defun kai-gnus-newsgroup-style-group (groupname) (if (string-match "^nnml:" groupname) nil t)) It considers all nnml groups to be mail style, all others to be newsgroup style. Suppose you wish to treat mailing lists like newsgroups, and further suppose your mailing list groups are called "nnml:list.foo", then you could use the following definition: (defun kai-gnus-newsgroup-style-group (groupname) (cond ((string-match "^nnml:list" groupname) t) ((string-match "^nnml:" groupname) nil) (t t))) kai -- Life is hard and then you die.