From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/8145 Path: main.gmane.org!not-for-mail From: Colin Rafferty Newsgroups: gmane.emacs.gnus.general Subject: [++] Re: Feature request: time dependent hiliting Date: 01 Oct 1996 17:00:52 -0400 Message-ID: References: Reply-To: Colin Rafferty NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035148354 10378 80.91.224.250 (20 Oct 2002 21:12:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:12:34 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.6/8.6.9) with SMTP id OAA09561 for ; Tue, 1 Oct 1996 14:32:41 -0700 Original-Received: from mlfire.ml.com (mlfire.ml.com [192.246.100.1]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Tue, 1 Oct 1996 23:01:38 +0200 Original-Received: from commpost.ml.com ([146.125.4.24]) by mlfire.ml.com (8.7.5/8.7.3/MLgw-2.07) with SMTP id RAA23913 for ; Tue, 1 Oct 1996 17:02:51 -0400 (EDT) Original-Received: from spssunp.spspme.ml.com (spssunp.spspme.ml.com [192.168.111.13]) by commpost.ml.com (8.6.12/8.6.12) with ESMTP id RAA26112 for ; Tue, 1 Oct 1996 17:01:37 -0400 Original-Received: by spssunp.spspme.ml.com (SMI-8.6/SMI-4.1) id RAA10488; Tue, 1 Oct 1996 17:00:53 -0400 Original-To: (ding) GNUS Mailing List X-Face: D>:hrrB{l6#\wU;)0R:OHSTA@ayd.Oq?s@Rrc;[+z0m+<-U"$G-J6L)F2QY`qK~uPu!s1(6{\#uy!Ag/D)?'L[}xErXvxoPn8T_hKi{M]/(`BF{e}X7;hby`p\.E$rJ}Aff#BT,rdDIw\y X-Y-Zippy: Yow! Are we laid back yet? In-Reply-To: David Moore's message of 01 Oct 1996 07:54:02 -0700 Original-Lines: 43 X-Mailer: Red Gnus v0.42/XEmacs 19.14 Xref: main.gmane.org gmane.emacs.gnus.general:8145 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:8145 David Moore writes: > I'd find it extremely useful if groups could be colored based on > the amount of time since I last read them. > It'd also be good to know just how long it's been since I haven't read > someone's mail. There was a discussion a long time ago about this. The basic solution is to save the current time in a group parameter, and access it in a user-format-function for display. Below is the code that I use. When I select a group, I save a formatted string of the current time as a group parameter. I then use %ud in the group-line-format to call a function that gets that parameter out. If you follow this basic strategy, it should be cool. .emacs: (add-hook 'gnus-select-group-hook 'gnus-select-group-hook-update-current-time) (defun gnus-select-group-hook-update-current-time () "For consideration as a `gnus-select-group-hook'." (let ((now (current-time-string))) (gnus-group-set-parameter group 'gnus-group-date-last-entered (concat (substring now 8 11) (substring now 4 8) (substring now 11 16))))) (setq gnus-group-line-format "%M%S%p%5y: %(%-35g%) %ud\n") (defun gnus-user-format-function-d (headers) "Return the date the group was last read." (cond ((gnus-group-get-parameter gnus-tmp-group 'gnus-group-date-last-entered)) (t ""))) -- This posting adheres to the SELF-DISCIPLINE guidelines for better USENET discussions. See http://www.eiffel.com/discipline.