Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE
Subject: Re: some mail annoyances
Date: 23 Jun 1999 09:39:23 +0200	[thread overview]
Message-ID: <vaf7lovpdqs.fsf@petty.cs.uni-dortmund.de> (raw)
In-Reply-To: Harry Putnam's message of "22 Jun 1999 05:00:53 -0700"

Harry Putnam <reader@newsguy.com> 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.


  parent reply	other threads:[~1999-06-23  7:39 UTC|newest]

Thread overview: 152+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-22  0:36 Per Bothner
1999-06-22  2:04 ` Stainless Steel Rat
1999-06-22  8:20 ` Kai.Grossjohann
1999-06-22  8:23 ` Kai.Grossjohann
1999-06-22 12:00   ` Harry Putnam
1999-06-22 22:34     ` Karl Kleinpaste
1999-06-23  7:39     ` Kai.Grossjohann [this message]
1999-06-23 14:25   ` Wes Hardaker
1999-06-22 12:53 ` Per Abrahamsen
1999-06-22 17:48   ` some mail annoyances [renumbering] Per Bothner
1999-06-22 18:20     ` Karl Kleinpaste
1999-06-23  7:00       ` Jaap-Henk Hoepman
1999-06-23  7:44         ` Kai.Grossjohann
1999-06-23  7:50           ` Per Abrahamsen
1999-06-23  8:18           ` Jaap-Henk Hoepman
1999-06-22 18:58     ` Per Abrahamsen
1999-06-22 19:29       ` Sam Falkner
1999-06-22 19:33         ` Finding a given in an nnml group (was: Re: some mail annoyances [renumbering]) Laura Conrad
1999-06-22 19:48           ` Jack Twilley
1999-06-22 19:48           ` Per Abrahamsen
1999-06-23  6:54           ` Kai.Grossjohann
1999-06-23 15:36             ` Laura Conrad
1999-06-23 17:46               ` Per Abrahamsen
1999-06-24  9:10               ` Kai.Grossjohann
1999-06-24 20:39           ` Justin Sheehy
1999-06-22 21:13         ` some mail annoyances [renumbering] Tony Lam
1999-06-23  7:05         ` Steinar Bang
1999-06-23 19:33         ` David Hedbor
1999-06-25 23:25           ` Kai.Grossjohann
1999-06-26  0:27             ` David Hedbor
1999-06-28 15:45               ` Karl Kleinpaste
1999-06-23  6:45     ` Kai.Grossjohann
1999-06-23 18:34       ` Being forced to deal with message numbers and frustrated Tony Lam
1999-06-23 19:56         ` Stainless Steel Rat
1999-06-23 22:13           ` Tony Lam
1999-06-24  0:20             ` Stainless Steel Rat
1999-06-24  6:44               ` Tony Lam
1999-06-24  9:19                 ` Kai.Grossjohann
1999-06-24  9:21                 ` Kai.Grossjohann
1999-06-24 14:58               ` Peter von der Ahé - at home
1999-06-24 15:37                 ` Norbert Koch
1999-06-24 17:58                   ` Tony Lam
1999-06-25 19:47                   ` David Hedbor
1999-06-25 20:56                     ` Matt Pharr
1999-06-28  1:53                       ` Tony Lam
1999-06-24 15:48                 ` Lee Willis
1999-06-24 18:01                   ` Tony Lam
1999-06-24  8:42             ` Per Abrahamsen
1999-06-24 17:05               ` Sam Falkner
1999-06-24 23:06                 ` Sam Falkner
1999-06-24  9:17             ` Kai.Grossjohann
1999-06-24  9:14         ` Kai.Grossjohann
1999-06-24 19:00           ` Tony Lam
1999-06-24 20:41             ` David S. Goldberg
1999-06-24 21:07             ` Kai.Grossjohann
1999-06-24 21:38               ` Tony Lam
1999-06-25  6:14                 ` Soeren Laursen
1999-07-04  1:30         ` Lars Magne Ingebrigtsen
1999-06-22 18:33   ` some mail annoyances [deleting mail] Per Bothner
1999-06-22 18:33     ` Jack Twilley
1999-06-22 18:54       ` Karl Kleinpaste
1999-06-22 19:15     ` Per Abrahamsen
1999-06-23  7:10       ` Jaap-Henk Hoepman
1999-06-23  7:32         ` Yair Friedman
1999-06-23  7:46         ` Kai.Grossjohann
1999-06-23 12:13         ` Randal L. Schwartz
1999-06-22 19:18     ` Nathan Williams
1999-06-23  7:51       ` Per Bothner
1999-06-23  6:58     ` Kai.Grossjohann
1999-06-23  7:23     ` Yair Friedman
1999-07-04  1:37     ` Lars Magne Ingebrigtsen
1999-06-22 19:37   ` some mail annoyances David S. Goldberg
1999-06-23  0:48   ` Dmitry Yaitskov
1999-06-23  7:42     ` Per Abrahamsen
1999-06-23  7:49       ` Kai.Grossjohann
1999-06-23 14:20       ` Dmitry Yaitskov
1999-06-23 19:15         ` some mail annoyances [article number overflow] Karl Kleinpaste
1999-06-23 21:02           ` Colin Rafferty
1999-06-23 21:09             ` Karl Kleinpaste
1999-06-22 12:58 ` some mail annoyances David S. Goldberg
1999-06-22 14:33 ` Steinar Bang
1999-06-22 16:43   ` Vin Shelton
1999-06-23  6:42     ` Kai.Grossjohann
1999-06-23  6:47     ` Jaap-Henk Hoepman
1999-06-23 14:24 ` Wes Hardaker
1999-06-24 21:19 ` Per Bothner
1999-06-25  3:18   ` Christian Nybø
1999-06-25 20:34     ` Ken McGlothlen
1999-06-25 23:51       ` Harry Putnam
1999-06-26  0:07         ` Ken McGlothlen
1999-06-26  0:19           ` Stainless Steel Rat
1999-06-26  2:05             ` Harry Putnam
1999-06-26  2:28               ` Stainless Steel Rat
1999-06-26  2:46                 ` Harry Putnam
1999-06-27 13:32                   ` Stainless Steel Rat
1999-06-27 21:15                     ` Harry Putnam
1999-06-28 23:43                       ` Stainless Steel Rat
1999-06-27 22:30                     ` Kai.Grossjohann
1999-06-28  2:49                       ` Harry Putnam
1999-06-28  8:09                         ` Kai.Grossjohann
1999-06-28 15:24                           ` Harry Putnam
1999-06-28 15:50                             ` Kai.Grossjohann
1999-06-26  9:32                 ` Kai.Grossjohann
1999-06-27 13:34                   ` Stainless Steel Rat
1999-06-28 13:58             ` Kim-Minh Kaplan
1999-06-26 13:16           ` Per Abrahamsen
1999-06-28 15:37             ` Karl Kleinpaste
1999-06-28 20:43               ` Wes Hardaker
1999-06-28 20:57                 ` Karl Kleinpaste
1999-06-25  5:10   ` Russ Allbery
1999-06-25 13:21   ` Per Abrahamsen
1999-06-25 13:25     ` Didier Verna
1999-06-25 13:39       ` Karl Kleinpaste
1999-06-25 13:43       ` Karl Kleinpaste
1999-06-25 13:52         ` customizing (was Re: some mail annoyances) Paul Stevenson
1999-07-04  2:19 ` some mail annoyances Lars Magne Ingebrigtsen
1999-07-04  2:44   ` Harry Putnam
1999-07-04  3:19     ` Lars Magne Ingebrigtsen
1999-07-04  6:15       ` Harry Putnam
1999-07-04  6:37         ` Lars Magne Ingebrigtsen
1999-07-04  6:51           ` Harry Putnam
1999-07-04 13:15           ` Hrvoje Niksic
1999-07-04 17:00     ` Kai.Grossjohann
1999-07-04 19:01       ` Harry Putnam
1999-07-04 19:31         ` Kai.Grossjohann
1999-07-04  6:37   ` Hans de Graaff
1999-07-05  3:11     ` Lars Magne Ingebrigtsen
1999-07-04 16:58   ` Kai.Grossjohann
1999-07-05  3:13     ` Lars Magne Ingebrigtsen
1999-07-05  9:28       ` Kai.Grossjohann
1999-07-06  3:58         ` Lars Magne Ingebrigtsen
1999-07-05  7:45     ` Jaap-Henk Hoepman
1999-07-06  4:02       ` Lars Magne Ingebrigtsen
1999-07-06  6:47         ` Jaap-Henk Hoepman
1999-07-06 15:54           ` Lars Magne Ingebrigtsen
1999-07-05 16:22     ` Robert Bihlmeyer
1999-07-05 18:32       ` François Pinard
1999-07-07 11:30         ` Robert Bihlmeyer
1999-07-07 14:20           ` François Pinard
1999-07-07 14:22             ` Lee Willis
1999-07-12 11:40             ` Robert Bihlmeyer
1999-07-06  3:59       ` Lars Magne Ingebrigtsen
1999-07-13  5:22     ` Rob Browning
1999-07-13 11:29       ` Kai Großjohann
1999-07-04 18:18   ` lconrad
1999-07-05  3:17     ` Lars Magne Ingebrigtsen
1999-07-07  0:34   ` Peter von der Ahé
1999-07-07  2:46     ` lconrad
1999-07-09 16:59     ` Lars Magne Ingebrigtsen
1999-07-09 18:39       ` Peter von der Ahé
1999-07-09 19:15         ` Lars Magne Ingebrigtsen
1999-07-28  7:36   ` Rob Browning

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=vaf7lovpdqs.fsf@petty.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /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).