From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/27316 Path: main.gmane.org!not-for-mail From: "BrYan P. Johnson" Newsgroups: gmane.emacs.gnus.general Subject: Re: [patch] Filter History for nnmail.el Date: 29 Nov 1999 16:24:29 -0500 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 1035164362 23909 80.91.224.250 (21 Oct 2002 01:39:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:39:22 +0000 (UTC) Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA19305 for ; Mon, 29 Nov 1999 16:28:31 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id PAB30320; Mon, 29 Nov 1999 15:28:20 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 29 Nov 1999 15:27:25 -0600 (CST) 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 PAA20333 for ; Mon, 29 Nov 1999 15:27:15 -0600 (CST) Original-Received: from honky.eng.mindspring.net (honky.eng.mindspring.net [207.69.192.164]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA19290 for ; Mon, 29 Nov 1999 16:26:49 -0500 (EST) Original-Received: (from beej@localhost) by honky.eng.mindspring.net (8.9.3/8.9.3) id QAA23169; Mon, 29 Nov 1999 16:24:29 -0500 Original-To: ding@gnus.org Original-Lines: 59 User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) XEmacs/21.1 (20 Minutes to Nikko) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:27316 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:27316 >>>>> On 24 Nov 1999 12:17:42 -0800, Danny Siu said: > with > (add-hook 'gnus-after-getting-new-news-hook > 'gnus-filter-history) > %m in gnus-group-line-format will not be able to display % in > group line even %if there are new mails splitted to the group > since gnus-filter-history set %nnmail-history-split to nil and > gnus-after-getting-new-news-hook is called %before group buffer > is prepared. > instead put gnus-filter-history in gnus-group-prepare-hook would > solve the problem. ie: > (add-hook 'gnus-group-prepare-hook 'gnus-filter-history) You are correct, except that adding gnus-filter-history to gnus-group-prepare-hook causes it to be called every time a group is read, a topic is folded, etc. Which wouldn't be a problem except that the current split is lost once you perform one of these activities. I've been looking at Gnus's hooks and can't seem to decide which one to use. Ideally, one should use a hook that is only called when new mail is received. That was why I initially chose gnus-after-getting-new-news-hook. Hrm. There are two solutions. Find another hook, or make gnus-filter-history non-destructive with regards to nnmail-split-history. The latter seems to me to be the more ideal. I wasn't too proud of the destruction. There's an update at my site . It still requires being added to a suitable hook (I use still gnus-after-getting-new-news-hook) but no longer messes with nnmail-split-history. After a bit more testing, I'll resubmit my patch to nnmail.el. I do have a question. I've added this to both gnus-after-getting-new-news-hook and gnus-group-mode-hook in my personal set up. That's because it seems that gnus-after-getting-new-news-hook isn't called when Gnus is started. It appears that it is only run after getting new news other than when starting Gnus. So I added it to gnus-group-mode-hook which is run *only* when Gnus is started. Please let me know if I'm misunderstanding: gnus-group-mode-hook is run only when gnus-group-mode is started (which seems to only be at startup). gnus-after-getting-new-news-hook is run after getting new news, unless you're getting new news as part of starting up gnus. Thanks, BrYan